Reshuffle gatewayTransportInit() (#496)
This commit is contained in:
@@ -81,20 +81,6 @@ void _begin() {
|
|||||||
|
|
||||||
signerInit();
|
signerInit();
|
||||||
|
|
||||||
#if defined(MY_GATEWAY_FEATURE)
|
|
||||||
#if defined(MY_INCLUSION_BUTTON_FEATURE)
|
|
||||||
inclusionInit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// initialize the transport driver
|
|
||||||
if (!gatewayTransportInit()) {
|
|
||||||
setIndication(INDICATION_ERR_INIT_GWTRANSPORT);
|
|
||||||
debug(PSTR("Transport driver init fail\n"));
|
|
||||||
// Nothing more we can do
|
|
||||||
_infiniteLoop();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// Read latest received controller configuration from EEPROM
|
// Read latest received controller configuration from EEPROM
|
||||||
hwReadConfigBlock((void*)&_cc, (void*)EEPROM_CONTROLLER_CONFIG_ADDRESS, sizeof(ControllerConfig));
|
hwReadConfigBlock((void*)&_cc, (void*)EEPROM_CONTROLLER_CONFIG_ADDRESS, sizeof(ControllerConfig));
|
||||||
// isMetric is bool, hence empty EEPROM (=0xFF) evaluates to true
|
// isMetric is bool, hence empty EEPROM (=0xFF) evaluates to true
|
||||||
@@ -145,6 +131,20 @@ void _begin() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(MY_GATEWAY_FEATURE)
|
||||||
|
#if defined(MY_INCLUSION_BUTTON_FEATURE)
|
||||||
|
inclusionInit();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// initialize the transport driver
|
||||||
|
if (!gatewayTransportInit()) {
|
||||||
|
setIndication(INDICATION_ERR_INIT_GWTRANSPORT);
|
||||||
|
debug(PSTR("Transport driver init fail\n"));
|
||||||
|
// Nothing more we can do
|
||||||
|
_infiniteLoop();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Call sketch setup
|
// Call sketch setup
|
||||||
if (setup)
|
if (setup)
|
||||||
setup();
|
setup();
|
||||||
|
|||||||
Reference in New Issue
Block a user