Re #2671: fixes difference between top and main LCD TX battery bars, code made more readable with macros
This commit is contained in:
committed by
Bertrand Songis
parent
00a5437dde
commit
5b4f0a0bbb
@@ -347,13 +347,13 @@ void setTopBatteryState(int state, uint8_t blinking)
|
||||
Ht1621Data1[4] |= 0x40; // Battery border // TODO this is not working for me, the border is ALWAYS on
|
||||
if (state > 0)
|
||||
Ht1621Data1[7] |= 0x80;
|
||||
if (state > 1)
|
||||
Ht1621Data1[9] |= 0x80;
|
||||
if (state > 2)
|
||||
Ht1621Data1[5] |= 0x80;
|
||||
if (state > 3)
|
||||
Ht1621Data1[10] |= 0x80;
|
||||
Ht1621Data1[9] |= 0x80;
|
||||
if (state > 4)
|
||||
Ht1621Data1[5] |= 0x80;
|
||||
if (state > 6)
|
||||
Ht1621Data1[10] |= 0x80;
|
||||
if (state > 8)
|
||||
Ht1621Data1[4] |= 0x80;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user