better error handling: initializing LCD sooner rather than later

This commit is contained in:
rusefi 2017-02-24 19:26:48 -05:00
parent fdaf0214b8
commit 4e151fae9c
1 changed files with 11 additions and 10 deletions

View File

@ -325,6 +325,17 @@ void initHardware(Logging *l) {
*/
initPrimaryPins();
#if EFI_HD44780_LCD
// initI2Cmodule();
lcd_HD44780_init(sharedLogger);
if (hasFirmwareError())
return;
lcd_HD44780_print_string(VCS_VERSION);
#endif /* EFI_HD44780_LCD */
if (hasFirmwareError()) {
return;
}
@ -423,16 +434,6 @@ void initHardware(Logging *l) {
initAdcDriver();
#endif
#if EFI_HD44780_LCD
// initI2Cmodule();
lcd_HD44780_init(sharedLogger);
if (hasFirmwareError())
return;
lcd_HD44780_print_string(VCS_VERSION);
#endif /* EFI_HD44780_LCD */
#if HAL_USE_I2C || defined(__DOXYGEN__)
addConsoleActionII("i2c", sendI2Cbyte);
#endif