Moved LCD initialization out of constructor
Since the class "MainMenu" was used within a static variable the initialization of the object (constructor call) was done before Arduino library startup. It always caused a crash when using AVRStudio with JTAG debugger (caused from calling the LCD initialization / the lot of I/O work / the stack used during this calls). By moving the LCD_INIT out of the constructor and using an explicit call inside of Arduino setup() implementation immediately fixed all problems and the JTAG debugger runs fine.
This commit is contained in:
@ -300,6 +300,8 @@ void setup()
|
||||
st_init(); // Initialize stepper;
|
||||
wd_init();
|
||||
setup_photpin();
|
||||
|
||||
LCD_INIT;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user