From cee86dd9685b5cf878f055a0e5dfbd11b278a3cc Mon Sep 17 00:00:00 2001 From: "bernet.andre@gmail.com" Date: Wed, 13 Mar 2013 13:54:10 +0000 Subject: [PATCH] [X9D] Battery voltage scale on calib page, double reboot sign --- src/general_menus.cpp | 4 ++-- src/main_views.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/general_menus.cpp b/src/general_menus.cpp index 61ebc7bde..df5331375 100644 --- a/src/general_menus.cpp +++ b/src/general_menus.cpp @@ -922,8 +922,8 @@ void menuGeneralDiagAna(uint8_t event) lcd_putsLeft(5*FH+1, STR_BATT_CALIB); static uint32_t adcBatt; adcBatt = ((adcBatt * 7) + anaIn(8)) / 8; // running average, sourced directly (to avoid unending debate :P) - uint32_t batCalV = ( adcBatt + adcBatt*(g_eeGeneral.vBatCalib)/128 ) * 15 ; - batCalV /= 256 ; + uint32_t batCalV = ( adcBatt + adcBatt*(g_eeGeneral.vBatCalib)/128 ) * BATT_SCALE; + batCalV >>= 11; putsVolts(LEN_CALIB_FIELDS*FW+4*FW, 5*FH+1, batCalV, (m_posVert==1 ? INVERS : 0)); #else lcd_putsLeft(6*FH-2, STR_BATT_CALIB); diff --git a/src/main_views.cpp b/src/main_views.cpp index 29cd2d54f..89c04bf54 100644 --- a/src/main_views.cpp +++ b/src/main_views.cpp @@ -743,10 +743,12 @@ void menuMainView(uint8_t event) } #endif // PCBX9D +#if !defined(PCBX9D) // And ! in case of unexpected shutdown if (unexpectedShutdown) { lcd_putcAtt(REBOOT_X, 0*FH, '!', INVERS); } +#endif if (s_global_warning) { s_warning = s_global_warning;