This commit is contained in:
Bertrand Songis
2015-10-25 11:49:29 +01:00
parent 85a5554922
commit 2aa2b41f3a
2 changed files with 4 additions and 4 deletions
@@ -799,7 +799,7 @@ int OpenTxFirmware::getCapability(const Capability capability)
case MixersMonitor:
return id.contains("mixersmon") ? 1 : 0;
case HasBatMeterRange:
return (IS_TARANIS(board) ? true : false);
return (IS_TARANIS(board) ? true : id.contains("battgraph"));
case DangerousFunctions:
return id.contains("danger") ? 1 : 0;
default:
+3 -3
View File
@@ -1133,10 +1133,10 @@ extern const char vers_stamp[];
#endif
extern uint8_t g_vbat100mV;
#if defined(CPUARM)
#define GET_TXBATT_BARS() (min(10, 10 * (g_vbat100mV - g_eeGeneral.vBatMin - 90) / (30 + g_eeGeneral.vBatMax - g_eeGeneral.vBatMin)))
#if defined(PCBTARANIS)
#define GET_TXBATT_BARS() (limit<int8_t>(0, 10 * (g_vbat100mV - g_eeGeneral.vBatMin - 90) / (30 + g_eeGeneral.vBatMax - g_eeGeneral.vBatMin), 10))
#else
#define GET_TXBATT_BARS() (limit<uint8_t>(2, 20 * (g_vbat100mV - g_eeGeneral.vBatMin - 90) / (30 + g_eeGeneral.vBatMax - g_eeGeneral.vBatMin), 20))
#define GET_TXBATT_BARS() (limit<int8_t>(2, 20 * (g_vbat100mV - g_eeGeneral.vBatMin - 90) / (30 + g_eeGeneral.vBatMax - g_eeGeneral.vBatMin), 20))
#endif
#define IS_TXBATT_WARNING() (g_vbat100mV <= g_eeGeneral.vBatWarn)