Skip to content

Commit

Permalink
Copy over move data from previous printer config
Browse files Browse the repository at this point in the history
  • Loading branch information
suchmememanyskill committed Mar 26, 2024
1 parent 364f1ee commit 41d0b77
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CYD-Klipper/src/conf/global_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,18 @@ void set_printer_config_index(int index)

new_config->color_scheme = old_config->color_scheme;

// TODO: Replace with memcpy
for (int i = 0; i < 3; i++){
new_config->hotend_presets[i] = old_config->hotend_presets[i];
new_config->bed_presets[i] = old_config->bed_presets[i];
}

for (int i = 0; i < 3; i++){
new_config->printer_move_x_steps[i] = old_config->printer_move_x_steps[i];
new_config->printer_move_y_steps[i] = old_config->printer_move_y_steps[i];
new_config->printer_move_z_steps[i] = old_config->printer_move_z_steps[i];
}

write_global_config();
ESP.restart();
}
Expand Down

0 comments on commit 41d0b77

Please sign in to comment.