Fix battery bars on small screens

This commit is contained in:
Andre Bernet
2016-12-13 12:34:36 +01:00
parent 6f325886a1
commit fbe11119b8
+1 -1
View File
@@ -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))