Fix farmless mode

This commit is contained in:
Alex Voinea 2022-08-25 13:08:12 +03:00 committed by DRracer
parent bef7b086e3
commit d1c30c338f
3 changed files with 11 additions and 4 deletions

View File

@ -758,8 +758,7 @@ static void factory_reset(char level)
// Force the "Follow calibration flow" message at the next boot up.
calibration_status_store(CALIBRATION_STATUS_Z_CALIBRATION);
eeprom_write_byte((uint8_t*)EEPROM_WIZARD_ACTIVE, 2); //run wizard
farm_mode = false;
eeprom_update_byte((uint8_t*)EEPROM_FARM_MODE, farm_mode);
farm_disable();
#ifdef FILAMENT_SENSOR
fsensor_enable();

View File

@ -394,13 +394,17 @@ void farm_gcode_g98() {
}
void farm_gcode_g99() {
farm_mode = 0;
farm_disable();
printer_connected = true;
eeprom_update_byte((unsigned char *)EEPROM_FARM_MODE, farm_mode);
lcd_update(2);
fCheckModeInit(); // alternatively invoke printer reset
}
void farm_disable() {
farm_mode = false;
eeprom_update_byte((uint8_t*)EEPROM_FARM_MODE, farm_mode);
}
#else //PRUSA_FARM
void prusa_statistics(_UNUSED uint8_t message) {
@ -425,5 +429,8 @@ void farm_gcode_g98() {
void farm_gcode_g99() {
}
void farm_disable() {
}
#endif //PRUSA_FARM

View File

@ -16,3 +16,4 @@ extern void farm_mode_init();
extern bool farm_prusa_code_seen();
extern void farm_gcode_g98();
extern void farm_gcode_g99();
extern void farm_disable();