@@ -244,17 +244,19 @@ static void jogdata_changed (jogdata_t *jogdata)
244244
245245static void onWCOChanged (void )
246246{
247+ machine_coords_t wco = {};
247248 uint_fast8_t idx = min (4 , N_AXIS );
248- machine_coords_t * wco = (machine_coords_t * )status_packet .msg ;
249249
250250 if (on_wco_changed )
251251 on_wco_changed ();
252252
253253 do {
254254 idx -- ;
255- wco -> values [idx ] = gc_get_offset (idx , false);
255+ wco . values [idx ] = gc_get_offset (idx , false);
256256 } while (idx );
257257
258+ memcpy (status_packet .msg , & wco , sizeof (machine_coords_t ));
259+
258260 display_update_now ();
259261
260262 msgtype = MachineMsg_WorkOffset ;
@@ -386,7 +388,7 @@ static void onReportOptions (bool newopt)
386388 on_report_options (newopt );
387389
388390 if (!newopt )
389- report_plugin ("I2C Display" , connected ? "0.12 " : "0.12 (not connected)" );
391+ report_plugin ("I2C Display" , connected ? "0.13 " : "0.13 (not connected)" );
390392}
391393
392394static void complete_setup (void * data )
@@ -442,7 +444,7 @@ void display_init (void)
442444 #endif
443445
444446 // delay final setup until startup is complete
445- protocol_enqueue_foreground_task (complete_setup , NULL );
447+ task_run_on_startup (complete_setup , NULL );
446448
447449#if KEYPAD_ENABLE
448450
@@ -455,7 +457,7 @@ void display_init (void)
455457#endif
456458
457459 } else
458- protocol_enqueue_foreground_task (report_warning , "I2C display not connected!" );
460+ task_run_on_startup (report_warning , "I2C display not connected!" );
459461}
460462
461463#endif // DISPLAY_ENABLE
0 commit comments