瀏覽代碼

Make lcd_wizard() more debug friendly.

Marek Bel 5 年之前
父節點
當前提交
002a7d31a4
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      Firmware/ultralcd.cpp

+ 4 - 0
Firmware/ultralcd.cpp

@@ -4669,6 +4669,10 @@ void lcd_wizard(WizState state)
 	bool end = false;
 	int wizard_event;
 	const char *msg = NULL;
+	// Make sure EEPROM_WIZARD_ACTIVE is true if entering using different entry point
+	// other than WizState::Run - it is useful for debugging wizard.
+	if (state != S::Run) eeprom_update_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 1);
+
 	while (!end) {
 		printf_P(PSTR("Wizard state: %d\n"), state);
 		switch (state) {