Fix reset bug after mesh inizialisation.
This commit is contained in:
@@ -41,10 +41,10 @@
|
|||||||
* here we define this default string as the date where the latest release
|
* here we define this default string as the date where the latest release
|
||||||
* version was tagged.
|
* version was tagged.
|
||||||
*/
|
*/
|
||||||
#define CUSTOM_BUILD_VERSION "1.2.0-b_4.5"
|
#define CUSTOM_BUILD_VERSION "1.2.0-b_4.6"
|
||||||
|
|
||||||
#ifndef STRING_DISTRIBUTION_DATE
|
#ifndef STRING_DISTRIBUTION_DATE
|
||||||
#define STRING_DISTRIBUTION_DATE "2021-06-18"
|
#define STRING_DISTRIBUTION_DATE "2021-06-19"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -649,7 +649,7 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
|
|||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_SAVE_EEPROM_S)) != NULL))
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_SAVE_EEPROM_S)) != NULL))
|
||||||
{
|
{
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Save EEPROM");
|
SERIAL_ECHOLNPGM("Special Menu: Save EEPROM");
|
||||||
queue.inject_P(PSTR("M500"));
|
settings.save(); // M500
|
||||||
buzzer.tone(105, 1108);
|
buzzer.tone(105, 1108);
|
||||||
buzzer.tone(210, 1661);
|
buzzer.tone(210, 1661);
|
||||||
}
|
}
|
||||||
@@ -657,9 +657,9 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
|
|||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_LOAD_DEFAULTS_S)) != NULL))
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_LOAD_DEFAULTS_S)) != NULL))
|
||||||
{
|
{
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Load FW Defaults");
|
SERIAL_ECHOLNPGM("Special Menu: Load FW Defaults");
|
||||||
queue.inject_P(PSTR("M502"));
|
settings.reset(); // M502
|
||||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||||
initializeGrid();
|
initializeGrid();
|
||||||
#endif
|
#endif
|
||||||
buzzer.tone(105, 1661);
|
buzzer.tone(105, 1661);
|
||||||
buzzer.tone(210, 1108);
|
buzzer.tone(210, 1108);
|
||||||
@@ -1999,12 +1999,28 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
|
|||||||
if (!all_axes_known())
|
if (!all_axes_known())
|
||||||
{
|
{
|
||||||
queue.inject_P(PSTR("G28\n"));
|
queue.inject_P(PSTR("G28\n"));
|
||||||
} else {
|
/*
|
||||||
|
set_axis_is_at_home(X_AXIS);
|
||||||
|
sync_plan_position();
|
||||||
|
set_axis_is_at_home(Y_AXIS);
|
||||||
|
sync_plan_position();
|
||||||
|
set_axis_is_at_home(Z_AXIS);
|
||||||
|
sync_plan_position();
|
||||||
|
report_current_position();
|
||||||
|
*/
|
||||||
|
} else {
|
||||||
// Go up before moving
|
// Go up before moving
|
||||||
|
//SERIAL_ECHOLNPGM("Z Up");
|
||||||
setAxisPosition_mm(5.0,Z);
|
setAxisPosition_mm(5.0,Z);
|
||||||
|
//report_current_position();
|
||||||
|
|
||||||
|
//SERIAL_ECHOLNPGM("Move X");
|
||||||
setAxisPosition_mm(_GET_MESH_X(mx),X);
|
setAxisPosition_mm(_GET_MESH_X(mx),X);
|
||||||
|
//report_current_position();
|
||||||
|
//SERIAL_ECHOLNPGM("Move Y");
|
||||||
setAxisPosition_mm(_GET_MESH_Y(my),Y);
|
setAxisPosition_mm(_GET_MESH_Y(my),Y);
|
||||||
|
//report_current_position();
|
||||||
|
//SERIAL_ECHOLNPGM("Z Down");
|
||||||
setAxisPosition_mm(EXT_LEVEL_HIGH,Z);
|
setAxisPosition_mm(EXT_LEVEL_HIGH,Z);
|
||||||
|
|
||||||
report_current_position();
|
report_current_position();
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
enum axis_t : uint8_t { X, Y, Z, X2, Y2, Z2, Z3, Z4 };
|
enum axis_t : uint8_t { X, Y, Z, X2, Y2, Z2, Z3, Z4 };
|
||||||
enum extruder_t : uint8_t { E0, E1, E2, E3, E4, E5, E6, E7 };
|
enum extruder_t : uint8_t { E0, E1, E2, E3, E4, E5, E6, E7 };
|
||||||
void setAxisPosition_mm(const float, const axis_t, const feedRate_t=0);
|
void setAxisPosition_mm(const float, const axis_t, const feedRate_t=0);
|
||||||
|
void initializeGrid();
|
||||||
|
|
||||||
char *itostr2(const uint8_t &x);
|
char *itostr2(const uint8_t &x);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user