Fix reset bug after mesh inizialisation.

This commit is contained in:
Knutwurst
2021-06-19 11:43:55 +02:00
parent f20b0c3058
commit aac24f36ce
3 changed files with 23 additions and 7 deletions

View File

@@ -41,10 +41,10 @@
* here we define this default string as the date where the latest release
* 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
#define STRING_DISTRIBUTION_DATE "2021-06-18"
#define STRING_DISTRIBUTION_DATE "2021-06-19"
#endif
/**

View File

@@ -649,7 +649,7 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_SAVE_EEPROM_S)) != NULL))
{
SERIAL_ECHOLNPGM("Special Menu: Save EEPROM");
queue.inject_P(PSTR("M500"));
settings.save(); // M500
buzzer.tone(105, 1108);
buzzer.tone(210, 1661);
}
@@ -657,7 +657,7 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_LOAD_DEFAULTS_S)) != NULL))
{
SERIAL_ECHOLNPGM("Special Menu: Load FW Defaults");
queue.inject_P(PSTR("M502"));
settings.reset(); // M502
#if ENABLED(KNUTWURST_TFT_LEVELING)
initializeGrid();
#endif
@@ -1999,12 +1999,28 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
if (!all_axes_known())
{
queue.inject_P(PSTR("G28\n"));
/*
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
//SERIAL_ECHOLNPGM("Z Up");
setAxisPosition_mm(5.0,Z);
//report_current_position();
//SERIAL_ECHOLNPGM("Move X");
setAxisPosition_mm(_GET_MESH_X(mx),X);
//report_current_position();
//SERIAL_ECHOLNPGM("Move Y");
setAxisPosition_mm(_GET_MESH_Y(my),Y);
//report_current_position();
//SERIAL_ECHOLNPGM("Z Down");
setAxisPosition_mm(EXT_LEVEL_HIGH,Z);
report_current_position();

View File

@@ -34,7 +34,7 @@
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 };
void setAxisPosition_mm(const float, const axis_t, const feedRate_t=0);
void initializeGrid();
char *itostr2(const uint8_t &x);