浏览代码

Audible feedback for settings store/load/reset

Scott Lahteine 7 年前
父节点
当前提交
b904b5ae8d

+ 9
- 11
Marlin/Marlin_main.cpp 查看文件

@@ -3792,10 +3792,8 @@ inline void gcode_G28() {
3792 3792
           mbl.set_has_mesh(true);
3793 3793
           mbl.set_reactivate(true);
3794 3794
           enqueue_and_echo_commands_P(PSTR("G28"));
3795
-          #if HAS_BUZZER
3796
-            lcd_buzz(200, 659);
3797
-            lcd_buzz(200, 698);
3798
-          #endif
3795
+          BUZZ(100, 659);
3796
+          BUZZ(100, 698);
3799 3797
         }
3800 3798
         break;
3801 3799
 
@@ -7289,8 +7287,8 @@ void quickstop_stepper() {
7289 7287
       SYNC_PLAN_POSITION_KINEMATIC();
7290 7288
       report_current_position();
7291 7289
       LCD_MESSAGEPGM(MSG_HOME_OFFSETS_APPLIED);
7292
-      BUZZ(200, 659);
7293
-      BUZZ(200, 698);
7290
+      BUZZ(100, 659);
7291
+      BUZZ(100, 698);
7294 7292
     }
7295 7293
   }
7296 7294
 
@@ -7300,28 +7298,28 @@ void quickstop_stepper() {
7300 7298
  * M500: Store settings in EEPROM
7301 7299
  */
7302 7300
 inline void gcode_M500() {
7303
-  Config_StoreSettings();
7301
+  (void)Config_StoreSettings();
7304 7302
 }
7305 7303
 
7306 7304
 /**
7307 7305
  * M501: Read settings from EEPROM
7308 7306
  */
7309 7307
 inline void gcode_M501() {
7310
-  Config_RetrieveSettings();
7308
+  (void)Config_RetrieveSettings();
7311 7309
 }
7312 7310
 
7313 7311
 /**
7314 7312
  * M502: Revert to default settings
7315 7313
  */
7316 7314
 inline void gcode_M502() {
7317
-  Config_ResetDefault();
7315
+  (void)Config_ResetDefault();
7318 7316
 }
7319 7317
 
7320 7318
 /**
7321 7319
  * M503: print settings currently in memory
7322 7320
  */
7323 7321
 inline void gcode_M503() {
7324
-  Config_PrintSettings(code_seen('S') && !code_value_bool());
7322
+  (void)Config_PrintSettings(code_seen('S') && !code_value_bool());
7325 7323
 }
7326 7324
 
7327 7325
 #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
@@ -10696,7 +10694,7 @@ void setup() {
10696 10694
 
10697 10695
   // Load data from EEPROM if available (or use defaults)
10698 10696
   // This also updates variables in the planner, elsewhere
10699
-  Config_RetrieveSettings();
10697
+  (void)Config_RetrieveSettings();
10700 10698
 
10701 10699
   #if DISABLED(NO_WORKSPACE_OFFSETS)
10702 10700
     // Initialize current position based on home_offset

+ 9
- 3
Marlin/configuration_store.cpp 查看文件

@@ -250,7 +250,7 @@ void Config_Postprocess() {
250 250
   /**
251 251
    * M500 - Store Configuration
252 252
    */
253
-  void Config_StoreSettings()  {
253
+  bool Config_StoreSettings()  {
254 254
     float dummy = 0.0f;
255 255
     char ver[4] = "000";
256 256
 
@@ -538,17 +538,20 @@ void Config_Postprocess() {
538 538
       SERIAL_ECHOPAIR("Settings Stored (", eeprom_size - (EEPROM_OFFSET));
539 539
       SERIAL_ECHOLNPGM(" bytes)");
540 540
     }
541
+
541 542
     #if ENABLED(AUTO_BED_LEVELING_UBL)
542 543
       blm.store_state();
543 544
       if (blm.state.EEPROM_storage_slot >= 0)
544 545
         blm.store_mesh(blm.state.EEPROM_storage_slot);
545 546
     #endif
547
+
548
+    return !eeprom_write_error;
546 549
   }
547 550
 
548 551
   /**
549 552
    * M501 - Retrieve Configuration
550 553
    */
551
-  void Config_RetrieveSettings() {
554
+  bool Config_RetrieveSettings() {
552 555
 
553 556
     EEPROM_START();
554 557
     eeprom_read_error = false; // If set EEPROM_READ won't write into RAM
@@ -883,13 +886,16 @@ void Config_Postprocess() {
883 886
     #if ENABLED(EEPROM_CHITCHAT)
884 887
       Config_PrintSettings();
885 888
     #endif
889
+
890
+    return !eeprom_read_error;
886 891
   }
887 892
 
888 893
 #else // !EEPROM_SETTINGS
889 894
 
890
-  void Config_StoreSettings() {
895
+  bool Config_StoreSettings() {
891 896
     SERIAL_ERROR_START;
892 897
     SERIAL_ERRORLNPGM("EEPROM disabled");
898
+    return false;
893 899
   }
894 900
 
895 901
 #endif // !EEPROM_SETTINGS

+ 3
- 3
Marlin/configuration_store.h 查看文件

@@ -26,7 +26,7 @@
26 26
 #include "MarlinConfig.h"
27 27
 
28 28
 void Config_ResetDefault();
29
-void Config_StoreSettings();
29
+bool Config_StoreSettings();
30 30
 
31 31
 #if DISABLED(DISABLE_M503)
32 32
   void Config_PrintSettings(bool forReplay=false);
@@ -35,9 +35,9 @@ void Config_StoreSettings();
35 35
 #endif
36 36
 
37 37
 #if ENABLED(EEPROM_SETTINGS)
38
-  void Config_RetrieveSettings();
38
+  bool Config_RetrieveSettings();
39 39
 #else
40
-  FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); }
40
+  FORCE_INLINE bool Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); return true; }
41 41
 #endif
42 42
 
43 43
 #endif //CONFIGURATION_STORE_H

+ 2
- 2
Marlin/language_an.h 查看文件

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

+ 2
- 2
Marlin/language_bg.h 查看文件

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

+ 2
- 2
Marlin/language_ca.h 查看文件

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

+ 2
- 2
Marlin/language_cn.h 查看文件

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

+ 2
- 2
Marlin/language_cz.h 查看文件

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

+ 2
- 2
Marlin/language_da.h 查看文件

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

+ 2
- 2
Marlin/language_de.h 查看文件

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

+ 2
- 2
Marlin/language_el-gr.h 查看文件

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

+ 2
- 2
Marlin/language_el.h 查看文件

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

+ 2
- 2
Marlin/language_en.h 查看文件

@@ -310,10 +310,10 @@
310 310
   #define MSG_CONTRAST                        _UxGT("LCD contrast")
311 311
 #endif
312 312
 #ifndef MSG_STORE_EPROM
313
-  #define MSG_STORE_EPROM                     _UxGT("Store memory")
313
+  #define MSG_STORE_EEPROM                    _UxGT("Store memory")
314 314
 #endif
315 315
 #ifndef MSG_LOAD_EPROM
316
-  #define MSG_LOAD_EPROM                      _UxGT("Load memory")
316
+  #define MSG_LOAD_EEPROM                     _UxGT("Load memory")
317 317
 #endif
318 318
 #ifndef MSG_RESTORE_FAILSAFE
319 319
   #define MSG_RESTORE_FAILSAFE                _UxGT("Restore failsafe")

+ 2
- 2
Marlin/language_es.h 查看文件

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

+ 2
- 2
Marlin/language_eu.h 查看文件

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

+ 2
- 2
Marlin/language_fi.h 查看文件

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

+ 2
- 2
Marlin/language_fr.h 查看文件

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

+ 2
- 2
Marlin/language_gl.h 查看文件

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

+ 2
- 2
Marlin/language_hr.h 查看文件

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

+ 2
- 2
Marlin/language_it.h 查看文件

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

+ 2
- 2
Marlin/language_kana.h 查看文件

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

+ 2
- 2
Marlin/language_kana_utf8.h 查看文件

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

+ 2
- 2
Marlin/language_nl.h 查看文件

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

+ 2
- 2
Marlin/language_pl.h 查看文件

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

+ 2
- 2
Marlin/language_pt-br.h 查看文件

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

+ 2
- 2
Marlin/language_pt-br_utf8.h 查看文件

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

+ 2
- 2
Marlin/language_pt.h 查看文件

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

+ 2
- 2
Marlin/language_pt_utf8.h 查看文件

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

+ 2
- 2
Marlin/language_ru.h 查看文件

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

+ 2
- 2
Marlin/language_tr.h 查看文件

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

+ 2
- 2
Marlin/language_uk.h 查看文件

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

+ 2
- 2
Marlin/language_zh_CN.h 查看文件

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

+ 2
- 2
Marlin/language_zh_TW.h 查看文件

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

+ 53
- 37
Marlin/ultralcd.cpp 查看文件

@@ -606,6 +606,43 @@ void kill_screen(const char* lcd_msg) {
606 606
 
607 607
 #if ENABLED(ULTIPANEL)
608 608
 
609
+  /**
610
+   *
611
+   * Audio feedback for controller clicks
612
+   *
613
+   */
614
+  void lcd_buzz(long duration, uint16_t freq) {
615
+    #if ENABLED(LCD_USE_I2C_BUZZER)
616
+      lcd.buzz(duration, freq);
617
+    #elif PIN_EXISTS(BEEPER)
618
+      buzzer.tone(duration, freq);
619
+    #else
620
+      UNUSED(duration); UNUSED(freq);
621
+    #endif
622
+  }
623
+
624
+  void lcd_quick_feedback() {
625
+    lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
626
+    buttons = 0;
627
+    next_button_update_ms = millis() + 500;
628
+
629
+    // Buzz and wait. The delay is needed for buttons to settle!
630
+    lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
631
+    #if ENABLED(LCD_USE_I2C_BUZZER)
632
+      delay(10);
633
+    #elif PIN_EXISTS(BEEPER)
634
+      for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); }
635
+    #endif
636
+  }
637
+
638
+  void lcd_completion_feedback(const bool good/*=true*/) {
639
+    if (good) {
640
+      lcd_buzz(100, 659);
641
+      lcd_buzz(100, 698);
642
+    }
643
+    else lcd_buzz(20, 440);
644
+  }
645
+
609 646
   inline void line_to_current(AxisEnum axis) {
610 647
     planner.buffer_line_kinematic(current_position, MMM_TO_MMS(manual_feedrate_mm_m[axis]), active_extruder);
611 648
   }
@@ -1382,10 +1419,7 @@ void kill_screen(const char* lcd_msg) {
1382 1419
           enqueue_and_echo_commands_P(PSTR("G28"));
1383 1420
           lcd_return_to_status();
1384 1421
           //LCD_MESSAGEPGM(MSG_LEVEL_BED_DONE);
1385
-          #if HAS_BUZZER
1386
-            lcd_buzz(200, 659);
1387
-            lcd_buzz(200, 698);
1388
-          #endif
1422
+          lcd_completion_feedback();
1389 1423
         }
1390 1424
         else {
1391 1425
           lcd_goto_screen(_lcd_level_goto_next_point);
@@ -1912,6 +1946,16 @@ KeepDrawing:
1912 1946
    *
1913 1947
    */
1914 1948
 
1949
+  #if ENABLED(EEPROM_SETTINGS)
1950
+    static void lcd_store_settings()   { lcd_completion_feedback(Config_StoreSettings()); }
1951
+    static void lcd_load_settings()    { lcd_completion_feedback(Config_RetrieveSettings()); }
1952
+  #endif
1953
+
1954
+  static void lcd_factory_settings() {
1955
+    Config_ResetDefault();
1956
+    lcd_completion_feedback();
1957
+  }
1958
+
1915 1959
   void lcd_control_menu() {
1916 1960
     START_MENU();
1917 1961
     MENU_BACK(MSG_MAIN);
@@ -1931,10 +1975,11 @@ KeepDrawing:
1931 1975
     #endif
1932 1976
 
1933 1977
     #if ENABLED(EEPROM_SETTINGS)
1934
-      MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings);
1935
-      MENU_ITEM(function, MSG_LOAD_EPROM, Config_RetrieveSettings);
1978
+      MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings);
1979
+      MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings);
1936 1980
     #endif
1937
-    MENU_ITEM(function, MSG_RESTORE_FAILSAFE, Config_ResetDefault);
1981
+
1982
+    MENU_ITEM(function, MSG_RESTORE_FAILSAFE, lcd_factory_settings);
1938 1983
     END_MENU();
1939 1984
   }
1940 1985
 
@@ -2175,7 +2220,7 @@ KeepDrawing:
2175 2220
       MENU_ITEM_EDIT(int3, MSG_BED, &lcd_preheat_bed_temp[material], BED_MINTEMP, BED_MAXTEMP - 15);
2176 2221
     #endif
2177 2222
     #if ENABLED(EEPROM_SETTINGS)
2178
-      MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings);
2223
+      MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings);
2179 2224
     #endif
2180 2225
     END_MENU();
2181 2226
   }
@@ -3005,35 +3050,6 @@ KeepDrawing:
3005 3050
 
3006 3051
   /**
3007 3052
    *
3008
-   * Audio feedback for controller clicks
3009
-   *
3010
-   */
3011
-  void lcd_buzz(long duration, uint16_t freq) {
3012
-    #if ENABLED(LCD_USE_I2C_BUZZER)
3013
-      lcd.buzz(duration, freq);
3014
-    #elif PIN_EXISTS(BEEPER)
3015
-      buzzer.tone(duration, freq);
3016
-    #else
3017
-      UNUSED(duration); UNUSED(freq);
3018
-    #endif
3019
-  }
3020
-
3021
-  void lcd_quick_feedback() {
3022
-    lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
3023
-    buttons = 0;
3024
-    next_button_update_ms = millis() + 500;
3025
-
3026
-    // Buzz and wait. The delay is needed for buttons to settle!
3027
-    lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
3028
-    #if ENABLED(LCD_USE_I2C_BUZZER)
3029
-      delay(10);
3030
-    #elif PIN_EXISTS(BEEPER)
3031
-      for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); }
3032
-    #endif
3033
-  }
3034
-
3035
-  /**
3036
-   *
3037 3053
    * Menu actions
3038 3054
    *
3039 3055
    */

+ 3
- 2
Marlin/ultralcd.h 查看文件

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

正在加载...
取消
保存