mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
Fix battery bars on small screens
This commit is contained in:
parent
6f325886a1
commit
fbe11119b8
1 changed files with 1 additions and 1 deletions
|
@ -965,7 +965,7 @@ extern const char vers_stamp[];
|
|||
#endif
|
||||
|
||||
extern uint8_t g_vbat100mV;
|
||||
#if defined(PCBTARANIS)
|
||||
#if LCD_W > 128
|
||||
#define GET_TXBATT_BARS() (limit<int8_t>(0, div_and_round(10 * (g_vbat100mV - g_eeGeneral.vBatMin - 90), 30 + g_eeGeneral.vBatMax - g_eeGeneral.vBatMin), 10))
|
||||
#else
|
||||
#define GET_TXBATT_BARS() (limit<int8_t>(2, 20 * (g_vbat100mV - g_eeGeneral.vBatMin - 90) / (30 + g_eeGeneral.vBatMax - g_eeGeneral.vBatMin), 20))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue