[X9D] Battery voltage scale on calib page, double reboot sign
This commit is contained in:
@@ -922,8 +922,8 @@ void menuGeneralDiagAna(uint8_t event)
|
|||||||
lcd_putsLeft(5*FH+1, STR_BATT_CALIB);
|
lcd_putsLeft(5*FH+1, STR_BATT_CALIB);
|
||||||
static uint32_t adcBatt;
|
static uint32_t adcBatt;
|
||||||
adcBatt = ((adcBatt * 7) + anaIn(8)) / 8; // running average, sourced directly (to avoid unending debate :P)
|
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 ;
|
uint32_t batCalV = ( adcBatt + adcBatt*(g_eeGeneral.vBatCalib)/128 ) * BATT_SCALE;
|
||||||
batCalV /= 256 ;
|
batCalV >>= 11;
|
||||||
putsVolts(LEN_CALIB_FIELDS*FW+4*FW, 5*FH+1, batCalV, (m_posVert==1 ? INVERS : 0));
|
putsVolts(LEN_CALIB_FIELDS*FW+4*FW, 5*FH+1, batCalV, (m_posVert==1 ? INVERS : 0));
|
||||||
#else
|
#else
|
||||||
lcd_putsLeft(6*FH-2, STR_BATT_CALIB);
|
lcd_putsLeft(6*FH-2, STR_BATT_CALIB);
|
||||||
|
|||||||
@@ -743,10 +743,12 @@ void menuMainView(uint8_t event)
|
|||||||
}
|
}
|
||||||
#endif // PCBX9D
|
#endif // PCBX9D
|
||||||
|
|
||||||
|
#if !defined(PCBX9D)
|
||||||
// And ! in case of unexpected shutdown
|
// And ! in case of unexpected shutdown
|
||||||
if (unexpectedShutdown) {
|
if (unexpectedShutdown) {
|
||||||
lcd_putcAtt(REBOOT_X, 0*FH, '!', INVERS);
|
lcd_putcAtt(REBOOT_X, 0*FH, '!', INVERS);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (s_global_warning) {
|
if (s_global_warning) {
|
||||||
s_warning = s_global_warning;
|
s_warning = s_global_warning;
|
||||||
|
|||||||
Reference in New Issue
Block a user