|
|
Rockbox mail archiveSubject: Complicated loop in powermgm.cFrom: Uwe Freese (mail_at_uwe-freese.de) Date: 2002-08-08
Hello,
Isn't this a little bit comlicated, or did I miss the point?
for (i = 0; i < CHARGE_END_ZEROD; i++)
Is
(x2-x1) + (x3-x2) = (x3-x1) ?
So instead of the loop, a
delta = power_history[POWER_HISTORY_LEN-1]*100 - power_history[POWER_HISTORY_LEN-1-CHARGE_END_ZEROD]*100;
will do it!
Bye, Uwe.
Page was last modified "Jan 10 2012" The Rockbox Crew |