Merge pull request #4494 from gudnimg/issue3122

Fix #3122
This commit is contained in:
3d-gussner 2023-11-12 17:42:10 +01:00 committed by GitHub
commit e74abb102a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 0 deletions

View File

@ -378,6 +378,10 @@ void save_print_file_state();
void restore_print_file_state();
void save_planner_global_state();
void refresh_print_state_in_ram();
/// Updates the feedrate multiplier when a print is saved such that
/// it is not overwritten when the print is later resumed
void refresh_saved_feedrate_multiplier_in_ram();
void clear_print_state_in_ram();
extern void stop_and_save_print_to_ram(float z_move, float e_move);
void restore_extruder_temperature_from_ram();

View File

@ -10572,6 +10572,15 @@ void refresh_print_state_in_ram()
isPartialBackupAvailable = true;
}
void __attribute__((noinline)) refresh_saved_feedrate_multiplier_in_ram() {
if (!saved_printing) {
// There is no saved print, therefore nothing to refresh
return;
}
saved_feedmultiply2 = feedmultiply;
}
void clear_print_state_in_ram()
{
// Set flag to false in order to avoid using

View File

@ -723,6 +723,7 @@ void lcd_status_screen() // NOT static due to using ins
if (initial_feedmultiply != feedmultiply) {
feedmultiply = constrain(feedmultiply, 10, 999);
lcd_encoder = 0; // Consume rotation event
refresh_saved_feedrate_multiplier_in_ram();
}
}
#endif //ULTIPANEL_FEEDMULTIPLY
@ -5443,6 +5444,9 @@ static void lcd_tune_menu()
SilentModeMenu = eeprom_read_byte((uint8_t*) EEPROM_SILENT);
MENU_BEGIN();
ON_MENU_LEAVE(
refresh_saved_feedrate_multiplier_in_ram();
);
MENU_ITEM_BACK_P(_T(MSG_MAIN));
MENU_ITEM_EDIT_int3_P(_i("Speed"), &feedmultiply, 10, 999);////MSG_SPEED c=15