Spectrum refactoring
This commit is contained in:
@@ -627,18 +627,11 @@ static void DrawStatus() {
|
|||||||
gBatteryVoltages[3]) /
|
gBatteryVoltages[3]) /
|
||||||
4;
|
4;
|
||||||
|
|
||||||
if (gBatteryCalibration[5] < Voltage) {
|
for(uint8_t i = 5; i > 0; i--) {
|
||||||
v = 5;
|
if(Voltage > gBatteryCalibration[i - 1]) {
|
||||||
} else if (gBatteryCalibration[4] < Voltage) {
|
v = i;
|
||||||
v = 5;
|
break;
|
||||||
} else if (gBatteryCalibration[3] < Voltage) {
|
}
|
||||||
v = 4;
|
|
||||||
} else if (gBatteryCalibration[2] < Voltage) {
|
|
||||||
v = 3;
|
|
||||||
} else if (gBatteryCalibration[1] < Voltage) {
|
|
||||||
v = 2;
|
|
||||||
} else if (gBatteryCalibration[0] < Voltage) {
|
|
||||||
v = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gStatusLine[127] = 0b01111110;
|
gStatusLine[127] = 0b01111110;
|
||||||
|
Reference in New Issue
Block a user