- preliminary fix for #1940 (if calculated voltage is under 0, we set it to 1%)
This commit is contained in:
parent
d06c5fdcc8
commit
163c043492
1 changed files with 3 additions and 0 deletions
|
@ -27,6 +27,9 @@ public class BatteryStatusDTO {
|
|||
|
||||
int percentInt = (int) (percent * 100.0d);
|
||||
|
||||
if (percentInt<0)
|
||||
percentInt = 1;
|
||||
|
||||
if (percentInt > 100)
|
||||
percentInt = 100;
|
||||
|
||||
|
|
Loading…
Reference in a new issue