forked from len0rd/rockbox
Fix signedness bug in trickle charge proportional adjustment which became visible due to the changed calculation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14371 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
da727b5ace
commit
2a258eac6b
1 changed files with 1 additions and 1 deletions
|
|
@ -1139,7 +1139,7 @@ static void power_thread(void)
|
|||
* generate more heat [gvb].
|
||||
*/
|
||||
|
||||
pid_p = (target_voltage - battery_millivolts) / 5;
|
||||
pid_p = ((signed)target_voltage - (signed)battery_millivolts) / 5;
|
||||
if((pid_p <= PID_DEADZONE) && (pid_p >= -PID_DEADZONE))
|
||||
pid_p = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue