Merge pull request #6079 from thinkyhead/rc_audio_feedback

Standard audio feedback. Use for settings store/load/reset
This commit is contained in:
Scott Lahteine 2017-03-22 07:35:57 -05:00 committed by GitHub
commit 100c9bc52d
35 changed files with 137 additions and 116 deletions

View file

@ -3792,10 +3792,8 @@ inline void gcode_G28() {
mbl.set_has_mesh(true);
mbl.set_reactivate(true);
enqueue_and_echo_commands_P(PSTR("G28"));
#if HAS_BUZZER
lcd_buzz(200, 659);
lcd_buzz(200, 698);
#endif
BUZZ(100, 659);
BUZZ(100, 698);
}
break;
@ -7289,8 +7287,8 @@ void quickstop_stepper() {
SYNC_PLAN_POSITION_KINEMATIC();
report_current_position();
LCD_MESSAGEPGM(MSG_HOME_OFFSETS_APPLIED);
BUZZ(200, 659);
BUZZ(200, 698);
BUZZ(100, 659);
BUZZ(100, 698);
}
}
@ -7300,28 +7298,28 @@ void quickstop_stepper() {
* M500: Store settings in EEPROM
*/
inline void gcode_M500() {
Config_StoreSettings();
(void)Config_StoreSettings();
}
/**
* M501: Read settings from EEPROM
*/
inline void gcode_M501() {
Config_RetrieveSettings();
(void)Config_RetrieveSettings();
}
/**
* M502: Revert to default settings
*/
inline void gcode_M502() {
Config_ResetDefault();
(void)Config_ResetDefault();
}
/**
* M503: print settings currently in memory
*/
inline void gcode_M503() {
Config_PrintSettings(code_seen('S') && !code_value_bool());
(void)Config_PrintSettings(code_seen('S') && !code_value_bool());
}
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
@ -10696,7 +10694,7 @@ void setup() {
// Load data from EEPROM if available (or use defaults)
// This also updates variables in the planner, elsewhere
Config_RetrieveSettings();
(void)Config_RetrieveSettings();
#if DISABLED(NO_WORKSPACE_OFFSETS)
// Initialize current position based on home_offset

View file

@ -250,7 +250,7 @@ void Config_Postprocess() {
/**
* M500 - Store Configuration
*/
void Config_StoreSettings() {
bool Config_StoreSettings() {
float dummy = 0.0f;
char ver[4] = "000";
@ -538,17 +538,20 @@ void Config_Postprocess() {
SERIAL_ECHOPAIR("Settings Stored (", eeprom_size - (EEPROM_OFFSET));
SERIAL_ECHOLNPGM(" bytes)");
}
#if ENABLED(AUTO_BED_LEVELING_UBL)
blm.store_state();
if (blm.state.EEPROM_storage_slot >= 0)
blm.store_mesh(blm.state.EEPROM_storage_slot);
#endif
return !eeprom_write_error;
}
/**
* M501 - Retrieve Configuration
*/
void Config_RetrieveSettings() {
bool Config_RetrieveSettings() {
EEPROM_START();
eeprom_read_error = false; // If set EEPROM_READ won't write into RAM
@ -883,13 +886,16 @@ void Config_Postprocess() {
#if ENABLED(EEPROM_CHITCHAT)
Config_PrintSettings();
#endif
return !eeprom_read_error;
}
#else // !EEPROM_SETTINGS
void Config_StoreSettings() {
bool Config_StoreSettings() {
SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("EEPROM disabled");
return false;
}
#endif // !EEPROM_SETTINGS

View file

@ -26,7 +26,7 @@
#include "MarlinConfig.h"
void Config_ResetDefault();
void Config_StoreSettings();
bool Config_StoreSettings();
#if DISABLED(DISABLE_M503)
void Config_PrintSettings(bool forReplay=false);
@ -35,9 +35,9 @@ void Config_StoreSettings();
#endif
#if ENABLED(EEPROM_SETTINGS)
void Config_RetrieveSettings();
bool Config_RetrieveSettings();
#else
FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }
FORCE_INLINE bool Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); return true; }
#endif
#endif //CONFIGURATION_STORE_H

View file

@ -118,8 +118,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E in mm3")
#define MSG_FILAMENT_DIAM _UxGT("Fil. Dia.")
#define MSG_CONTRAST _UxGT("Contraste")
#define MSG_STORE_EPROM _UxGT("Alzar memoria")
#define MSG_LOAD_EPROM _UxGT("Cargar memoria")
#define MSG_STORE_EEPROM _UxGT("Alzar memoria")
#define MSG_LOAD_EEPROM _UxGT("Cargar memoria")
#define MSG_RESTORE_FAILSAFE _UxGT("Restaurar memoria")
#define MSG_REFRESH _UxGT("Tornar a cargar")
#define MSG_WATCH _UxGT("Informacion")

View file

@ -119,8 +119,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E in mm3")
#define MSG_FILAMENT_DIAM _UxGT("Диам. нишка")
#define MSG_CONTRAST _UxGT("LCD контраст")
#define MSG_STORE_EPROM _UxGT("Запази в EPROM")
#define MSG_LOAD_EPROM _UxGT("Зареди от EPROM")
#define MSG_STORE_EEPROM _UxGT("Запази в EPROM")
#define MSG_LOAD_EEPROM _UxGT("Зареди от EPROM")
#define MSG_RESTORE_FAILSAFE _UxGT("Фабрични настройки")
#define MSG_REFRESH LCD_STR_REFRESH _UxGT("Обнови")
#define MSG_WATCH _UxGT("Преглед")

View file

@ -123,8 +123,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E en mm3")
#define MSG_FILAMENT_DIAM _UxGT("Diam. Fil.")
#define MSG_CONTRAST _UxGT("Contrast de LCD")
#define MSG_STORE_EPROM _UxGT("Desa memoria")
#define MSG_LOAD_EPROM _UxGT("Carrega memoria")
#define MSG_STORE_EEPROM _UxGT("Desa memoria")
#define MSG_LOAD_EEPROM _UxGT("Carrega memoria")
#define MSG_RESTORE_FAILSAFE _UxGT("Restaura valors")
#define MSG_REFRESH _UxGT("Actualitza")
#define MSG_WATCH _UxGT("Pantalla Info.")

View file

@ -111,8 +111,8 @@
#define MSG_VOLUMETRIC_ENABLED "E in mm3"
#define MSG_FILAMENT_DIAM "Fil. Dia."
#define MSG_CONTRAST "LCD contrast"
#define MSG_STORE_EPROM "Store memory"
#define MSG_LOAD_EPROM "Load memory"
#define MSG_STORE_EEPROM "Store memory"
#define MSG_LOAD_EEPROM "Load memory"
#define MSG_RESTORE_FAILSAFE "Restore failsafe"
#define MSG_REFRESH "Refresh"
#define MSG_WATCH "\xec\xed\xee\xef"

View file

@ -122,8 +122,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E na mm3")
#define MSG_FILAMENT_DIAM _UxGT("Fil. Prum.")
#define MSG_CONTRAST _UxGT("Kontrast LCD")
#define MSG_STORE_EPROM _UxGT("Ulozit nastaveni")
#define MSG_LOAD_EPROM _UxGT("Nacist nastaveni")
#define MSG_STORE_EEPROM _UxGT("Ulozit nastaveni")
#define MSG_LOAD_EEPROM _UxGT("Nacist nastaveni")
#define MSG_RESTORE_FAILSAFE _UxGT("Obnovit vychozi")
#define MSG_REFRESH _UxGT("Obnovit")
#define MSG_WATCH _UxGT("Info obrazovka")

View file

@ -120,8 +120,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E i mm3")
#define MSG_FILAMENT_DIAM _UxGT("Fil. Dia.")
#define MSG_CONTRAST _UxGT("LCD kontrast")
#define MSG_STORE_EPROM _UxGT("Gem i EEPROM")
#define MSG_LOAD_EPROM _UxGT("Hent fra EEPROM")
#define MSG_STORE_EEPROM _UxGT("Gem i EEPROM")
#define MSG_LOAD_EEPROM _UxGT("Hent fra EEPROM")
#define MSG_RESTORE_FAILSAFE _UxGT("Gendan failsafe")
#define MSG_REFRESH _UxGT("Genopfrisk")
#define MSG_WATCH _UxGT("Info skærm")

View file

@ -124,8 +124,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E in mm³")
#define MSG_FILAMENT_DIAM _UxGT("D Fil.")
#define MSG_CONTRAST _UxGT("LCD Kontrast")
#define MSG_STORE_EPROM _UxGT("EPROM speichern")
#define MSG_LOAD_EPROM _UxGT("EPROM laden")
#define MSG_STORE_EEPROM _UxGT("EPROM speichern")
#define MSG_LOAD_EEPROM _UxGT("EPROM laden")
#define MSG_RESTORE_FAILSAFE _UxGT("Standardkonfiguration")
#define MSG_REFRESH _UxGT("Aktualisieren")
#define MSG_WATCH _UxGT("Info")

View file

@ -118,8 +118,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("Ε σε μμ3")
#define MSG_FILAMENT_DIAM _UxGT("Διάμετρος νήματος")
#define MSG_CONTRAST _UxGT("Κοντράστ LCD")
#define MSG_STORE_EPROM _UxGT("Αποθήκευση")
#define MSG_LOAD_EPROM _UxGT("Φόρτωση")
#define MSG_STORE_EEPROM _UxGT("Αποθήκευση")
#define MSG_LOAD_EEPROM _UxGT("Φόρτωση")
#define MSG_RESTORE_FAILSAFE _UxGT("Επαναφορά ασφαλούς αντιγράφου")
#define MSG_REFRESH _UxGT("Ανανέωση")
#define MSG_WATCH _UxGT("Οθόνη πληροφόρησης")

View file

@ -118,8 +118,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("Ε σε μμ3")
#define MSG_FILAMENT_DIAM _UxGT("Διάμετρος νήματος")
#define MSG_CONTRAST _UxGT("Κοντράστ LCD")
#define MSG_STORE_EPROM _UxGT("Αποθήκευση")
#define MSG_LOAD_EPROM _UxGT("Φόρτωση")
#define MSG_STORE_EEPROM _UxGT("Αποθήκευση")
#define MSG_LOAD_EEPROM _UxGT("Φόρτωση")
#define MSG_RESTORE_FAILSAFE _UxGT("Επαναφορά ασφαλούς αντιγράφου") //SHORTEN
#define MSG_REFRESH _UxGT("Ανανέωση")
#define MSG_WATCH _UxGT("Οθόνη πληροφόρησης")

View file

@ -310,10 +310,10 @@
#define MSG_CONTRAST _UxGT("LCD contrast")
#endif
#ifndef MSG_STORE_EPROM
#define MSG_STORE_EPROM _UxGT("Store memory")
#define MSG_STORE_EEPROM _UxGT("Store memory")
#endif
#ifndef MSG_LOAD_EPROM
#define MSG_LOAD_EPROM _UxGT("Load memory")
#define MSG_LOAD_EEPROM _UxGT("Load memory")
#endif
#ifndef MSG_RESTORE_FAILSAFE
#define MSG_RESTORE_FAILSAFE _UxGT("Restore failsafe")

View file

@ -122,8 +122,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E in mm3")
#define MSG_FILAMENT_DIAM _UxGT("Fil. Dia.")
#define MSG_CONTRAST _UxGT("Contraste")
#define MSG_STORE_EPROM _UxGT("Guardar memoria")
#define MSG_LOAD_EPROM _UxGT("Cargar memoria")
#define MSG_STORE_EEPROM _UxGT("Guardar memoria")
#define MSG_LOAD_EEPROM _UxGT("Cargar memoria")
#define MSG_RESTORE_FAILSAFE _UxGT("Restaurar memoria")
#define MSG_REFRESH _UxGT("Volver a cargar")
#define MSG_WATCH _UxGT("Informacion")

View file

@ -109,8 +109,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E in mm3")
#define MSG_FILAMENT_DIAM _UxGT("Fil. Dia.")
#define MSG_CONTRAST _UxGT("LCD kontrastea")
#define MSG_STORE_EPROM _UxGT("Gorde memoria")
#define MSG_LOAD_EPROM _UxGT("Kargatu memoria")
#define MSG_STORE_EEPROM _UxGT("Gorde memoria")
#define MSG_LOAD_EEPROM _UxGT("Kargatu memoria")
#define MSG_RESTORE_FAILSAFE _UxGT("Larri. berriz.")
#define MSG_REFRESH _UxGT("Berriz kargatu")
#define MSG_WATCH _UxGT("Pantaila info")

View file

@ -110,8 +110,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E in mm³")
#define MSG_FILAMENT_DIAM _UxGT("Fil. Dia.")
#define MSG_CONTRAST _UxGT("LCD kontrasti")
#define MSG_STORE_EPROM _UxGT("Tallenna muistiin")
#define MSG_LOAD_EPROM _UxGT("Lataa muistista")
#define MSG_STORE_EEPROM _UxGT("Tallenna muistiin")
#define MSG_LOAD_EEPROM _UxGT("Lataa muistista")
#define MSG_RESTORE_FAILSAFE _UxGT("Palauta oletus")
#define MSG_REFRESH _UxGT("Päivitä")
#define MSG_WATCH _UxGT("Seuraa")

View file

@ -123,8 +123,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E en mm3")
#define MSG_FILAMENT_DIAM _UxGT("Diam. Fil.")
#define MSG_CONTRAST _UxGT("Contraste LCD")
#define MSG_STORE_EPROM _UxGT("Sauver config")
#define MSG_LOAD_EPROM _UxGT("Lire config")
#define MSG_STORE_EEPROM _UxGT("Sauver config")
#define MSG_LOAD_EEPROM _UxGT("Lire config")
#define MSG_RESTORE_FAILSAFE _UxGT("Restaurer défauts")
#define MSG_REFRESH _UxGT("Actualiser")
#define MSG_WATCH _UxGT("Surveiller")

View file

@ -119,8 +119,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E en mm3")
#define MSG_FILAMENT_DIAM _UxGT("Diam. fil.")
#define MSG_CONTRAST _UxGT("Constraste LCD")
#define MSG_STORE_EPROM _UxGT("Gardar en memo.")
#define MSG_LOAD_EPROM _UxGT("Cargar de memo.")
#define MSG_STORE_EEPROM _UxGT("Gardar en memo.")
#define MSG_LOAD_EEPROM _UxGT("Cargar de memo.")
#define MSG_RESTORE_FAILSAFE _UxGT("Cargar de firm.")
#define MSG_REFRESH _UxGT("Volver a cargar")
#define MSG_WATCH _UxGT("Monitorizacion")

View file

@ -118,8 +118,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E in mm3")
#define MSG_FILAMENT_DIAM _UxGT("Fil. Dia.")
#define MSG_CONTRAST _UxGT("Kontrast LCD-a")
#define MSG_STORE_EPROM _UxGT("Pohrani u memoriju")
#define MSG_LOAD_EPROM _UxGT("Učitaj memoriju")
#define MSG_STORE_EEPROM _UxGT("Pohrani u memoriju")
#define MSG_LOAD_EEPROM _UxGT("Učitaj memoriju")
#define MSG_RESTORE_FAILSAFE _UxGT("Učitaj failsafe")
#define MSG_REFRESH _UxGT("Osvježi")
#define MSG_WATCH _UxGT("Info screen")

View file

@ -126,8 +126,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E in mm3")
#define MSG_FILAMENT_DIAM _UxGT("Diam. filo")
#define MSG_CONTRAST _UxGT("Contrasto LCD")
#define MSG_STORE_EPROM _UxGT("Salva in memoria")
#define MSG_LOAD_EPROM _UxGT("Carica da memoria")
#define MSG_STORE_EEPROM _UxGT("Salva in memoria")
#define MSG_LOAD_EEPROM _UxGT("Carica da memoria")
#define MSG_RESTORE_FAILSAFE _UxGT("Ripristina imp.")
#define MSG_REFRESH _UxGT("Aggiorna")
#define MSG_WATCH _UxGT("Guarda")

View file

@ -157,8 +157,8 @@
#define MSG_FILAMENT_DIAM "\xcc\xa8\xd7\xd2\xdd\xc4\xb9\xb2" // "フィラメントケイ" ("Fil. Dia.")
#endif
#define MSG_CONTRAST "LCD\xba\xdd\xc4\xd7\xbd\xc4" // "LCDコントラスト" ("LCD contrast")
#define MSG_STORE_EPROM "\xd2\xd3\xd8\xcd\xb6\xb8\xc9\xb3" // "メモリヘカクノウ" ("Store memory")
#define MSG_LOAD_EPROM "\xd2\xd3\xd8\xb6\xd7\xd6\xd0\xba\xd0" // "メモリカラヨミコミ" ("Load memory")
#define MSG_STORE_EEPROM "\xd2\xd3\xd8\xcd\xb6\xb8\xc9\xb3" // "メモリヘカクノウ" ("Store memory")
#define MSG_LOAD_EEPROM "\xd2\xd3\xd8\xb6\xd7\xd6\xd0\xba\xd0" // "メモリカラヨミコミ" ("Load memory")
#define MSG_RESTORE_FAILSAFE "\xbe\xaf\xc3\xb2\xd8\xbe\xaf\xc4" // "セッテイリセット" ("Restore failsafe")
#define MSG_REFRESH "\xd8\xcc\xda\xaf\xbc\xad" // "リフレッシュ" ("Refresh")
#define MSG_WATCH "\xbc\xde\xae\xb3\xce\xb3\xb6\xde\xd2\xdd" // "ジョウホウガメン" ("Info screen")

View file

@ -128,8 +128,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E in mm3")
#define MSG_FILAMENT_DIAM _UxGT("フィラメントチョッケイ") // "Fil. Dia."
#define MSG_CONTRAST _UxGT("LCDコントラスト") // "LCD contrast"
#define MSG_STORE_EPROM _UxGT("メモリヘカクノウ") // "Store memory"
#define MSG_LOAD_EPROM _UxGT("メモリカラヨミコミ") // "Load memory"
#define MSG_STORE_EEPROM _UxGT("メモリヘカクノウ") // "Store memory"
#define MSG_LOAD_EEPROM _UxGT("メモリカラヨミコミ") // "Load memory"
#define MSG_RESTORE_FAILSAFE _UxGT("セッテイリセット") // "Restore failsafe"
#define MSG_REFRESH _UxGT("リフレッシュ") // "Refresh"
#define MSG_WATCH _UxGT("ジョウホウガメン") // "Info screen"

View file

@ -118,8 +118,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E in mm3")
#define MSG_FILAMENT_DIAM _UxGT("Fil. Dia.")
#define MSG_CONTRAST _UxGT("LCD contrast")
#define MSG_STORE_EPROM _UxGT("Geheugen opslaan")
#define MSG_LOAD_EPROM _UxGT("Geheugen laden")
#define MSG_STORE_EEPROM _UxGT("Geheugen opslaan")
#define MSG_LOAD_EEPROM _UxGT("Geheugen laden")
#define MSG_RESTORE_FAILSAFE _UxGT("Noodstop reset")
#define MSG_REFRESH _UxGT("Ververs")
#define MSG_WATCH _UxGT("Info scherm")

View file

@ -118,8 +118,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E w mm3")
#define MSG_FILAMENT_DIAM _UxGT("Sr. fil.")
#define MSG_CONTRAST _UxGT("Kontrast LCD")
#define MSG_STORE_EPROM _UxGT("Zapisz w pamieci")
#define MSG_LOAD_EPROM _UxGT("Wczytaj z pamieci")
#define MSG_STORE_EEPROM _UxGT("Zapisz w pamieci")
#define MSG_LOAD_EEPROM _UxGT("Wczytaj z pamieci")
#define MSG_RESTORE_FAILSAFE _UxGT("Ustaw. fabryczne")
#define MSG_REFRESH _UxGT("Odswiez")
#define MSG_WATCH _UxGT("Ekran glowny")

View file

@ -111,8 +111,8 @@
#define MSG_VOLUMETRIC_ENABLED "Extr. em mm3"
#define MSG_FILAMENT_DIAM "Diametro Fil."
#define MSG_CONTRAST "Contraste"
#define MSG_STORE_EPROM "Salvar"
#define MSG_LOAD_EPROM "Ler"
#define MSG_STORE_EEPROM "Salvar"
#define MSG_LOAD_EEPROM "Ler"
#define MSG_RESTORE_FAILSAFE "Rest. de emerg."
#define MSG_REFRESH LCD_STR_REFRESH " Restaurar"
#define MSG_WATCH "Monitorar"

View file

@ -111,8 +111,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("Extr. em mm3")
#define MSG_FILAMENT_DIAM _UxGT("Diametro Fil.")
#define MSG_CONTRAST _UxGT("Contraste")
#define MSG_STORE_EPROM _UxGT("Salvar")
#define MSG_LOAD_EPROM _UxGT("Ler")
#define MSG_STORE_EEPROM _UxGT("Salvar")
#define MSG_LOAD_EEPROM _UxGT("Ler")
#define MSG_RESTORE_FAILSAFE _UxGT("Rest. de emerg.")
#define MSG_REFRESH LCD_STR_REFRESH _UxGT(" Restaurar")
#define MSG_WATCH _UxGT("Monitorar")

View file

@ -115,8 +115,8 @@
#define MSG_VOLUMETRIC_ENABLED "E em mm3"
#define MSG_FILAMENT_DIAM "Fil. Diam."
#define MSG_CONTRAST "Contraste"
#define MSG_STORE_EPROM "Guardar na memoria"
#define MSG_LOAD_EPROM "Carregar da memoria"
#define MSG_STORE_EEPROM "Guardar na memoria"
#define MSG_LOAD_EEPROM "Carregar da memoria"
#define MSG_RESTORE_FAILSAFE "Rest. de emergen."
#define MSG_REFRESH LCD_STR_REFRESH " Recarregar"
#define MSG_WATCH "Monitorizar"

View file

@ -115,8 +115,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E em mm3")
#define MSG_FILAMENT_DIAM _UxGT("Fil. Diam.")
#define MSG_CONTRAST _UxGT("Contraste")
#define MSG_STORE_EPROM _UxGT("Guardar na memoria")
#define MSG_LOAD_EPROM _UxGT("Carregar da memoria")
#define MSG_STORE_EEPROM _UxGT("Guardar na memoria")
#define MSG_LOAD_EEPROM _UxGT("Carregar da memoria")
#define MSG_RESTORE_FAILSAFE _UxGT("Rest. de emergen.")
#define MSG_REFRESH LCD_STR_REFRESH _UxGT(" Recarregar")
#define MSG_WATCH _UxGT("Monitorizar")

View file

@ -115,8 +115,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E в mm3")
#define MSG_FILAMENT_DIAM _UxGT("Диаметр прутка")
#define MSG_CONTRAST _UxGT("Контраст LCD")
#define MSG_STORE_EPROM _UxGT("Сохранить в EEPROM")
#define MSG_LOAD_EPROM _UxGT("Считать из EEPROM")
#define MSG_STORE_EEPROM _UxGT("Сохранить в EEPROM")
#define MSG_LOAD_EEPROM _UxGT("Считать из EEPROM")
#define MSG_RESTORE_FAILSAFE _UxGT("Сброс EEPROM")
#define MSG_REFRESH _UxGT("Обновить")
#define MSG_WATCH _UxGT("Обзор")

View file

@ -123,8 +123,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E in mm3") // E in mm3
#define MSG_FILAMENT_DIAM _UxGT("Fil. Çap") // Fil. Çap
#define MSG_CONTRAST _UxGT("LCD Kontrast") // LCD Kontrast
#define MSG_STORE_EPROM _UxGT("Hafızaya Al") // Hafızaya Al
#define MSG_LOAD_EPROM _UxGT("Hafızadan Yükle") // Hafızadan Yükle
#define MSG_STORE_EEPROM _UxGT("Hafızaya Al") // Hafızaya Al
#define MSG_LOAD_EEPROM _UxGT("Hafızadan Yükle") // Hafızadan Yükle
#define MSG_RESTORE_FAILSAFE _UxGT("Fabrika Ayarları") // Fabrika Ayarları
#define MSG_REFRESH _UxGT("Yenile") // Yenile
#define MSG_WATCH _UxGT("Bilgi Ekranı") // Bilgi Ekranı

View file

@ -119,8 +119,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("E в мм3")
#define MSG_FILAMENT_DIAM _UxGT("Діам. волок.")
#define MSG_CONTRAST _UxGT("контраст LCD")
#define MSG_STORE_EPROM _UxGT("Зберегти в ПЗП")
#define MSG_LOAD_EPROM _UxGT("Зчитати з ПЗП")
#define MSG_STORE_EEPROM _UxGT("Зберегти в ПЗП")
#define MSG_LOAD_EEPROM _UxGT("Зчитати з ПЗП")
#define MSG_RESTORE_FAILSAFE _UxGT("Відновити базові")
#define MSG_REFRESH _UxGT("Поновити")
#define MSG_WATCH _UxGT("Інформація")

View file

@ -112,8 +112,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("测容积mm³") //"E in mm3" volumetric_enabled
#define MSG_FILAMENT_DIAM _UxGT("丝料直径") //"Fil. Dia."
#define MSG_CONTRAST _UxGT("LCD对比度") //"LCD contrast"
#define MSG_STORE_EPROM _UxGT("保存设置") //"Store memory"
#define MSG_LOAD_EPROM _UxGT("装载设置") //"Load memory"
#define MSG_STORE_EEPROM _UxGT("保存设置") //"Store memory"
#define MSG_LOAD_EEPROM _UxGT("装载设置") //"Load memory"
#define MSG_RESTORE_FAILSAFE _UxGT("恢复安全值") //"Restore failsafe"
#define MSG_REFRESH _UxGT("刷新") //"Refresh"
#define MSG_WATCH _UxGT("信息屏") //"Info screen"

View file

@ -112,8 +112,8 @@
#define MSG_VOLUMETRIC_ENABLED _UxGT("測容積mm³") //"E in mm3" volumetric_enabled
#define MSG_FILAMENT_DIAM _UxGT("絲料直徑") //"Fil. Dia."
#define MSG_CONTRAST _UxGT("LCD對比度") //"LCD contrast"
#define MSG_STORE_EPROM _UxGT("保存設置") //"Store memory"
#define MSG_LOAD_EPROM _UxGT("裝載設置") //"Load memory"
#define MSG_STORE_EEPROM _UxGT("保存設置") //"Store memory"
#define MSG_LOAD_EEPROM _UxGT("裝載設置") //"Load memory"
#define MSG_RESTORE_FAILSAFE _UxGT("恢複安全值") //"Restore failsafe"
#define MSG_REFRESH _UxGT("刷新") //"Refresh"
#define MSG_WATCH _UxGT("資訊界面") //"Info screen"

View file

@ -606,6 +606,43 @@ void kill_screen(const char* lcd_msg) {
#if ENABLED(ULTIPANEL)
/**
*
* Audio feedback for controller clicks
*
*/
void lcd_buzz(long duration, uint16_t freq) {
#if ENABLED(LCD_USE_I2C_BUZZER)
lcd.buzz(duration, freq);
#elif PIN_EXISTS(BEEPER)
buzzer.tone(duration, freq);
#else
UNUSED(duration); UNUSED(freq);
#endif
}
void lcd_quick_feedback() {
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
buttons = 0;
next_button_update_ms = millis() + 500;
// Buzz and wait. The delay is needed for buttons to settle!
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#if ENABLED(LCD_USE_I2C_BUZZER)
delay(10);
#elif PIN_EXISTS(BEEPER)
for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); }
#endif
}
void lcd_completion_feedback(const bool good/*=true*/) {
if (good) {
lcd_buzz(100, 659);
lcd_buzz(100, 698);
}
else lcd_buzz(20, 440);
}
inline void line_to_current(AxisEnum axis) {
planner.buffer_line_kinematic(current_position, MMM_TO_MMS(manual_feedrate_mm_m[axis]), active_extruder);
}
@ -1382,10 +1419,7 @@ void kill_screen(const char* lcd_msg) {
enqueue_and_echo_commands_P(PSTR("G28"));
lcd_return_to_status();
//LCD_MESSAGEPGM(MSG_LEVEL_BED_DONE);
#if HAS_BUZZER
lcd_buzz(200, 659);
lcd_buzz(200, 698);
#endif
lcd_completion_feedback();
}
else {
lcd_goto_screen(_lcd_level_goto_next_point);
@ -1912,6 +1946,16 @@ KeepDrawing:
*
*/
#if ENABLED(EEPROM_SETTINGS)
static void lcd_store_settings() { lcd_completion_feedback(Config_StoreSettings()); }
static void lcd_load_settings() { lcd_completion_feedback(Config_RetrieveSettings()); }
#endif
static void lcd_factory_settings() {
Config_ResetDefault();
lcd_completion_feedback();
}
void lcd_control_menu() {
START_MENU();
MENU_BACK(MSG_MAIN);
@ -1931,10 +1975,11 @@ KeepDrawing:
#endif
#if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings);
MENU_ITEM(function, MSG_LOAD_EPROM, Config_RetrieveSettings);
MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings);
MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings);
#endif
MENU_ITEM(function, MSG_RESTORE_FAILSAFE, Config_ResetDefault);
MENU_ITEM(function, MSG_RESTORE_FAILSAFE, lcd_factory_settings);
END_MENU();
}
@ -2175,7 +2220,7 @@ KeepDrawing:
MENU_ITEM_EDIT(int3, MSG_BED, &lcd_preheat_bed_temp[material], BED_MINTEMP, BED_MAXTEMP - 15);
#endif
#if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings);
MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings);
#endif
END_MENU();
}
@ -3003,35 +3048,6 @@ KeepDrawing:
#endif // REPRAPWORLD_KEYPAD
/**
*
* Audio feedback for controller clicks
*
*/
void lcd_buzz(long duration, uint16_t freq) {
#if ENABLED(LCD_USE_I2C_BUZZER)
lcd.buzz(duration, freq);
#elif PIN_EXISTS(BEEPER)
buzzer.tone(duration, freq);
#else
UNUSED(duration); UNUSED(freq);
#endif
}
void lcd_quick_feedback() {
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
buttons = 0;
next_button_update_ms = millis() + 500;
// Buzz and wait. The delay is needed for buttons to settle!
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#if ENABLED(LCD_USE_I2C_BUZZER)
delay(10);
#elif PIN_EXISTS(BEEPER)
for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); }
#endif
}
/**
*
* Menu actions

View file

@ -78,9 +78,10 @@
#define EN_B (_BV(BLEN_B))
#define EN_C (_BV(BLEN_C))
extern volatile uint8_t buttons; //the last checked buttons in a bit array.
extern volatile uint8_t buttons; // The last-checked buttons in a bit array.
void lcd_buttons_update();
void lcd_quick_feedback(); // Audible feedback for a button click - could also be visual
void lcd_quick_feedback(); // Audible feedback for a button click - could also be visual
void lcd_completion_feedback(const bool good=true);
#if ENABLED(FILAMENT_CHANGE_FEATURE)
void lcd_filament_change_show_message(const FilamentChangeMessage message);