From 43e7680c9b00a0b6b55ff1f427ce560d2b3bd22f Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Sun, 20 Mar 2016 17:00:58 +0100 Subject: [PATCH] Re #3371: ARM stuff removed from AVR version of checkBattery() --- radio/src/opentx.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index f7336b4a6..90aed8420 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -2167,14 +2167,7 @@ void checkBattery() if (counter-- == 0) { counter = 10; int32_t instant_vbat = anaIn(TX_VOLTAGE); -#if defined(PCBTARANIS) || defined(PCBFLAMENCO) || defined(PCBHORUS) - instant_vbat = (instant_vbat + instant_vbat*(g_eeGeneral.txVoltageCalibration)/128) * BATT_SCALE; - instant_vbat >>= 11; - instant_vbat += 2; // because of the diode -#elif defined(PCBSKY9X) - instant_vbat = (instant_vbat + instant_vbat*(g_eeGeneral.txVoltageCalibration)/128) * 4191; - instant_vbat /= 55296; -#elif defined(CPUM2560) +#if defined(CPUM2560) instant_vbat = (instant_vbat*1112 + instant_vbat*g_eeGeneral.txVoltageCalibration + (BandGap<<2)) / (BandGap<<3); #else instant_vbat = (instant_vbat*16 + instant_vbat*g_eeGeneral.txVoltageCalibration/8) / BandGap; @@ -2212,14 +2205,6 @@ void checkBattery() if (IS_TXBATT_WARNING() && g_vbat100mV>50) { AUDIO_TX_BATTERY_LOW(); } -#if defined(PCBSKY9X) - else if (g_eeGeneral.temperatureWarn && getTemperature() >= g_eeGeneral.temperatureWarn) { - AUDIO_TX_TEMP_HIGH(); - } - else if (g_eeGeneral.mAhWarn && (g_eeGeneral.mAhUsed + Current_used * (488 + g_eeGeneral.txCurrentCalibration)/8192/36) / 500 >= g_eeGeneral.mAhWarn) { - AUDIO_TX_MAH_HIGH(); - } -#endif } } }