Add M428 to set home_offset logically

This commit is contained in:
Scott Lahteine
2015-04-29 18:26:16 -07:00
parent 2610b8d047
commit d065d37822
4 changed files with 37 additions and 11 deletions

View File

@ -438,17 +438,12 @@ static void lcd_main_menu() {
}
#endif
/**
* Set the home offset based on the current_position
*/
void lcd_set_home_offsets() {
for (int8_t i=0; i < NUM_AXIS; i++) {
if (i != E_AXIS) {
home_offset[i] -= current_position[i];
current_position[i] = 0.0;
}
}
plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]);
// Audio feedback
enqueuecommands_P(PSTR("M300 S659 P200\nM300 S698 P200"));
// Command with Audio feedback
enqueuecommands_P(PSTR("M428\nM300 S659 P200\nM300 S698 P200"));
lcd_return_to_status();
}