Merge pull request #1096 from thinkyhead/set-home
Proposed feature: Set Home Offsets
This commit is contained in:
@ -307,6 +307,23 @@ static void lcd_autostart_sd()
|
||||
}
|
||||
#endif
|
||||
|
||||
void lcd_set_home_offsets()
|
||||
{
|
||||
for(int8_t i=0; i < NUM_AXIS; i++) {
|
||||
if (i != E_AXIS) {
|
||||
add_homeing[i] -= current_position[i];
|
||||
current_position[i] = 0.0;
|
||||
}
|
||||
}
|
||||
plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]);
|
||||
|
||||
// Audio feedback
|
||||
enquecommand_P(PSTR("M300 S659 P200"));
|
||||
enquecommand_P(PSTR("M300 S698 P200"));
|
||||
lcd_return_to_status();
|
||||
}
|
||||
|
||||
|
||||
#ifdef BABYSTEPPING
|
||||
static void lcd_babystep_x()
|
||||
{
|
||||
@ -568,6 +585,7 @@ static void lcd_prepare_menu()
|
||||
#endif
|
||||
MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
|
||||
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
|
||||
MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
|
||||
//MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
|
||||
#if TEMP_SENSOR_0 != 0
|
||||
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_BED != 0
|
||||
|
Reference in New Issue
Block a user