1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-01 02:21:46 +02:00

Fixed startup issue with spindle

The spindle object was not getting created unitl after the wifi starts. If a n open serial port starts requesting status of the spindle, it is trying to talk to a null object.

The solution was to start the spindle before the wifi
This commit is contained in:
bdring
2020-05-09 14:35:14 -05:00
parent 5b83da5ff2
commit 2043e220e0

View File

@@ -91,6 +91,7 @@ void setup() {
#ifdef HOMING_INIT_LOCK
if (bit_istrue(settings.flags, BITFLAG_HOMING_ENABLE)) sys.state = STATE_ALARM;
#endif
spindle_select(SPINDLE_TYPE);
#ifdef ENABLE_WIFI
wifi_config.begin();
#endif
@@ -117,7 +118,7 @@ void loop() {
// Reset Grbl primary systems.
serial_reset_read_buffer(CLIENT_ALL); // Clear serial read buffer
gc_init(); // Set g-code parser to default state
spindle_select(SPINDLE_TYPE);
//spindle_select(SPINDLE_TYPE);
coolant_init();
limits_init();
probe_init();