From 1e734d361a4d69a0cc1092a8016ea48f958f034d Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Wed, 31 May 2017 17:52:00 +0200 Subject: [PATCH] selftest static memory error fixed; snmm: updated stop print messages --- Firmware/language_all.cpp | 26 ++++++++++++++++++++++---- Firmware/language_all.h | 12 ++++++------ Firmware/language_cz.h | 5 ++++- Firmware/language_en.h | 2 +- Firmware/ultralcd.cpp | 9 +++++---- 5 files changed, 38 insertions(+), 16 deletions(-) diff --git a/Firmware/language_all.cpp b/Firmware/language_all.cpp index 076b266e1..e447f6399 100644 --- a/Firmware/language_all.cpp +++ b/Firmware/language_all.cpp @@ -26,7 +26,13 @@ const char * const MSG_ADJUSTZ_LANG_TABLE[LANG_NUM] PROGMEM = { }; const char MSG_ALL_EN[] PROGMEM = "All"; -const char * const MSG_ALL_LANG_TABLE[1] PROGMEM = { +const char MSG_ALL_CZ[] PROGMEM = "Vse"; +const char * const MSG_ALL_LANG_TABLE[LANG_NUM] PROGMEM = { + MSG_ALL_EN, + MSG_ALL_CZ, + MSG_ALL_EN, + MSG_ALL_EN, + MSG_ALL_EN, MSG_ALL_EN }; @@ -706,7 +712,13 @@ const char * const MSG_COUNT_X_LANG_TABLE[1] PROGMEM = { }; const char MSG_CURRENT_EN[] PROGMEM = "Current"; -const char * const MSG_CURRENT_LANG_TABLE[1] PROGMEM = { +const char MSG_CURRENT_CZ[] PROGMEM = "Pouze aktualni"; +const char * const MSG_CURRENT_LANG_TABLE[LANG_NUM] PROGMEM = { + MSG_CURRENT_EN, + MSG_CURRENT_CZ, + MSG_CURRENT_EN, + MSG_CURRENT_EN, + MSG_CURRENT_EN, MSG_CURRENT_EN }; @@ -3164,8 +3176,14 @@ const char * const MSG_USB_PRINTING_LANG_TABLE[LANG_NUM] PROGMEM = { MSG_USB_PRINTING_DE }; -const char MSG_USED_EN[] PROGMEM = "Used"; -const char * const MSG_USED_LANG_TABLE[1] PROGMEM = { +const char MSG_USED_EN[] PROGMEM = "Used during print"; +const char MSG_USED_CZ[] PROGMEM = "Pouzite behem tisku"; +const char * const MSG_USED_LANG_TABLE[LANG_NUM] PROGMEM = { + MSG_USED_EN, + MSG_USED_CZ, + MSG_USED_EN, + MSG_USED_EN, + MSG_USED_EN, MSG_USED_EN }; diff --git a/Firmware/language_all.h b/Firmware/language_all.h index f6d555b97..adbfa684d 100644 --- a/Firmware/language_all.h +++ b/Firmware/language_all.h @@ -30,8 +30,8 @@ extern const char* const MSG_ACTIVE_EXTRUDER_LANG_TABLE[1]; #define MSG_ACTIVE_EXTRUDER LANG_TABLE_SELECT_EXPLICIT(MSG_ACTIVE_EXTRUDER_LANG_TABLE, 0) extern const char* const MSG_ADJUSTZ_LANG_TABLE[LANG_NUM]; #define MSG_ADJUSTZ LANG_TABLE_SELECT(MSG_ADJUSTZ_LANG_TABLE) -extern const char* const MSG_ALL_LANG_TABLE[1]; -#define MSG_ALL LANG_TABLE_SELECT_EXPLICIT(MSG_ALL_LANG_TABLE, 0) +extern const char* const MSG_ALL_LANG_TABLE[LANG_NUM]; +#define MSG_ALL LANG_TABLE_SELECT(MSG_ALL_LANG_TABLE) extern const char* const MSG_AMAX_LANG_TABLE[1]; #define MSG_AMAX LANG_TABLE_SELECT_EXPLICIT(MSG_AMAX_LANG_TABLE, 0) extern const char* const MSG_AUTHOR_LANG_TABLE[1]; @@ -142,8 +142,8 @@ extern const char* const MSG_CORRECTLY_LANG_TABLE[LANG_NUM]; #define MSG_CORRECTLY LANG_TABLE_SELECT(MSG_CORRECTLY_LANG_TABLE) extern const char* const MSG_COUNT_X_LANG_TABLE[1]; #define MSG_COUNT_X LANG_TABLE_SELECT_EXPLICIT(MSG_COUNT_X_LANG_TABLE, 0) -extern const char* const MSG_CURRENT_LANG_TABLE[1]; -#define MSG_CURRENT LANG_TABLE_SELECT_EXPLICIT(MSG_CURRENT_LANG_TABLE, 0) +extern const char* const MSG_CURRENT_LANG_TABLE[LANG_NUM]; +#define MSG_CURRENT LANG_TABLE_SELECT(MSG_CURRENT_LANG_TABLE) extern const char* const MSG_DISABLE_STEPPERS_LANG_TABLE[LANG_NUM]; #define MSG_DISABLE_STEPPERS LANG_TABLE_SELECT(MSG_DISABLE_STEPPERS_LANG_TABLE) extern const char* const MSG_DWELL_LANG_TABLE[LANG_NUM]; @@ -586,8 +586,8 @@ extern const char* const MSG_UNLOAD_FILAMENT_4_LANG_TABLE[LANG_NUM]; #define MSG_UNLOAD_FILAMENT_4 LANG_TABLE_SELECT(MSG_UNLOAD_FILAMENT_4_LANG_TABLE) extern const char* const MSG_USB_PRINTING_LANG_TABLE[LANG_NUM]; #define MSG_USB_PRINTING LANG_TABLE_SELECT(MSG_USB_PRINTING_LANG_TABLE) -extern const char* const MSG_USED_LANG_TABLE[1]; -#define MSG_USED LANG_TABLE_SELECT_EXPLICIT(MSG_USED_LANG_TABLE, 0) +extern const char* const MSG_USED_LANG_TABLE[LANG_NUM]; +#define MSG_USED LANG_TABLE_SELECT(MSG_USED_LANG_TABLE) extern const char* const MSG_USERWAIT_LANG_TABLE[LANG_NUM]; #define MSG_USERWAIT LANG_TABLE_SELECT(MSG_USERWAIT_LANG_TABLE) extern const char* const MSG_VMIN_LANG_TABLE[1]; diff --git a/Firmware/language_cz.h b/Firmware/language_cz.h index 896d3f1bb..db16cd21c 100644 --- a/Firmware/language_cz.h +++ b/Firmware/language_cz.h @@ -292,4 +292,7 @@ #define MSG_TEMP_CALIBRATION_DONE "Teplotni kalibrace dokoncena. Pokracujte stiskem tlacitka." #define MSG_TEMP_CALIBRATION_ON "Tepl. kal. [ON]" #define MSG_TEMP_CALIBRATION_OFF "Tepl. kal. [OFF]" -#define MSG_PREPARE_FILAMENT "Pripravte filament" \ No newline at end of file +#define MSG_PREPARE_FILAMENT "Pripravte filament" +#define MSG_ALL "Vse" +#define MSG_USED "Pouzite behem tisku" +#define MSG_CURRENT "Pouze aktualni" \ No newline at end of file diff --git a/Firmware/language_en.h b/Firmware/language_en.h index cd8b6aec8..2e049c38a 100644 --- a/Firmware/language_en.h +++ b/Firmware/language_en.h @@ -294,7 +294,7 @@ #define(length=20, lines=1) MSG_TEMP_CALIBRATION_OFF "Temp. cal. [OFF]" #define(length=20, lines=1) MSG_PREPARE_FILAMENT "Prepare new filament" #define(length=19, lines=1) MSG_ALL "All" -#define(length=19, lines=1) MSG_USED "Used" +#define(length=19, lines=1) MSG_USED "Used during print" #define(length=19, lines=1) MSG_CURRENT "Current" diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index dab8b525d..515cd88bb 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -4319,10 +4319,11 @@ static bool lcd_selfcheck_endstops() if (READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1 || READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1 || READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING == 1) { _result = false; - String _error = String((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) ? "X" : "") + - String((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1) ? "Y" : "") + - String((READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING == 1) ? "Z" : ""); - lcd_selftest_error(3, _error.c_str(), ""); + char _error[4] = ""; + if (READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) strcat(_error, "X"); + if (READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1) strcat(_error, "Y"); + if (READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING == 1) strcat(_error, "Z"); + lcd_selftest_error(3, _error, ""); } manage_heater(); manage_inactivity(true);