show critical faults on the screen

This commit is contained in:
Kevin Hester
2020-12-26 13:36:21 +08:00
parent 1e9ebbc476
commit 651bd71454
8 changed files with 69 additions and 20 deletions

View File

@@ -92,6 +92,7 @@ void scanI2Cdevice(void)
DEBUG_MSG("Unknow error at address 0x%x\n", addr);
}
}
if (nDevices == 0)
DEBUG_MSG("No I2C devices found\n");
else
@@ -362,6 +363,10 @@ void setup()
nrf52Setup();
#endif
// We do this as early as possible because this loads preferences from flash
// but we need to do this after main cpu iniot (esp32setup), because we need the random seed set
nodeDB.init();
// Currently only the tbeam has a PMU
power = new Power();
power->setStatusHandler(powerStatus);
@@ -420,6 +425,12 @@ void setup()
service.init();
// Do this after service.init (because that clears error_code)
#ifdef AXP192_SLAVE_ADDRESS
if(!axp192_found)
recordCriticalError(ErrNoAXP192); // Record a hardware fault for missing hardware
#endif
// Don't call screen setup until after nodedb is setup (because we need
// the current region name)
#if defined(ST7735_CS) || defined(HAS_EINK)