mirror of
https://github.com/armel/uv-k1-k5v3-firmware-custom.git
synced 2026-10-02 11:08:20 +00:00
Fix levels array index for -1 possibility #196
This commit is contained in:
1 parent
5df29e0955
commit
de4d7d3934
1 file changed
+1
-1
+1
-1
@@ -127,7 +127,7 @@ void BATTERY_GetReadings(const bool bDisplayBatteryLevel)
|
||||
//sprintf(str, "%d %d %d %d %d %d %d\n", gBatteryVoltages[0], gBatteryVoltages[1], gBatteryVoltages[2], gBatteryVoltages[3], Voltage, gBatteryVoltageAverage, perc);
|
||||
//LogUart(str);
|
||||
|
||||
for(uint8_t i = 6; i >= 1; i--){
|
||||
for(uint8_t i = 6; i >= 2; i--){
|
||||
//sprintf(str, "%d %d %d\n", perc, levels[i-2], i);
|
||||
//LogUart(str);
|
||||
if (perc > levels[i-2]) {
|
||||
|
||||
Reference in new issue
Block a user