Added writing flag to EEPROM, that we started/finished print to detect printer reset and need for filaments adjustment.
This commit is contained in:
parent
34ba8c3bf7
commit
047f2a8389
4 changed files with 20 additions and 1 deletions
|
@ -43,7 +43,7 @@
|
|||
#define EEPROM_BED_CORRECTION_FRONT (EEPROM_BED_CORRECTION_RIGHT-1)
|
||||
#define EEPROM_BED_CORRECTION_REAR (EEPROM_BED_CORRECTION_FRONT-1)
|
||||
#define EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY (EEPROM_BED_CORRECTION_REAR-1)
|
||||
#define EEPROM_STEPS_PER_UNIT_E (EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY-4)
|
||||
#define EEPROM_PRINT_FLAG (EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY-1)
|
||||
|
||||
// Currently running firmware, each digit stored as uint16_t.
|
||||
// The flavor differentiates a dev, alpha, beta, release candidate or a release version.
|
||||
|
|
|
@ -120,6 +120,10 @@ void Config_StoreSettings()
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/*MYSERIAL.print("Top address used:\n");
|
||||
MYSERIAL.print(i);
|
||||
MYSERIAL.print("\n");
|
||||
*/
|
||||
char ver2[4]=EEPROM_VERSION;
|
||||
i=EEPROM_OFFSET;
|
||||
EEPROM_WRITE_VAR(i,ver2); // validate data
|
||||
|
|
|
@ -2051,6 +2051,18 @@ void process_commands()
|
|||
|
||||
#endif
|
||||
}
|
||||
else if (code_seen("SetF")) {
|
||||
#ifdef SNMM
|
||||
bool not_finished = (eeprom_read_byte((unsigned char*)EEPROM_PRINT_FLAG) != PRINT_FINISHED);
|
||||
eeprom_update_byte((unsigned char*)EEPROM_PRINT_FLAG, PRINT_STARTED);
|
||||
if (not_finished) enquecommand_front_P(PSTR("PRUSA Y"));
|
||||
#endif
|
||||
}
|
||||
else if (code_seen("ResF")) {
|
||||
#ifdef SNMM
|
||||
eeprom_update_byte((unsigned char*)EEPROM_PRINT_FLAG, PRINT_FINISHED);
|
||||
#endif
|
||||
}
|
||||
//else if (code_seen('Cal')) {
|
||||
// lcd_calibration();
|
||||
// }
|
||||
|
|
|
@ -582,6 +582,9 @@ void lcd_commands()
|
|||
{
|
||||
// M84: Disable steppers.
|
||||
enquecommand_P(PSTR("M84"));
|
||||
#ifdef SNMM
|
||||
enquecommand_P(PSTR("PRUSA ResF")); //resets flag at the end of the print (used for SNMM)
|
||||
#endif
|
||||
autotempShutdown();
|
||||
lcd_commands_step = 2;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue