Browse Source

Info Menu: Runaway Watch state (#14827)

Tim Moore 5 years ago
parent
commit
7e72768433

+ 1
- 1
Marlin/src/HAL/HAL_DUE/persistent_store_eeprom.cpp View File

@@ -44,7 +44,7 @@ bool PersistentStore::access_finish() {
44 44
   return true;
45 45
 }
46 46
 
47
-bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
47
+bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
48 48
   while (size--) {
49 49
     uint8_t * const p = (uint8_t * const)pos;
50 50
     uint8_t v = *value;

+ 1
- 1
Marlin/src/HAL/HAL_ESP32/persistent_store_spiffs.cpp View File

@@ -72,7 +72,7 @@ bool PersistentStore::access_finish() {
72 72
   return true;
73 73
 }
74 74
 
75
-bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
75
+bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
76 76
   if (!eeprom_file.seek(pos)) return true; // return true for any error
77 77
   if (eeprom_file.write(value, size) != size) return true;
78 78
 

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/persistent_store_flash.cpp View File

@@ -109,7 +109,7 @@ bool PersistentStore::access_finish() {
109 109
   return true;
110 110
 }
111 111
 
112
-bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
112
+bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
113 113
   for (size_t i = 0; i < size; i++) ram_eeprom[pos + i] = value[i];
114 114
   eeprom_dirty = true;
115 115
   crc16(crc, value, size);

+ 1
- 1
Marlin/src/HAL/HAL_SAMD51/persistent_store_eeprom.cpp View File

@@ -58,7 +58,7 @@ bool PersistentStore::access_finish() {
58 58
   return true;
59 59
 }
60 60
 
61
-bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
61
+bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
62 62
   #if NONE(SPI_EEPROM, I2C_EEPROM)
63 63
     if (NVMCTRL->SEESTAT.bit.RLOCK)
64 64
       NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_USEE);    // Unlock E2P data write access

+ 1
- 1
Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp View File

@@ -50,7 +50,7 @@ bool PersistentStore::access_finish() {
50 50
   return true;
51 51
 }
52 52
 
53
-bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
53
+bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
54 54
   while (size--) {
55 55
     uint8_t v = *value;
56 56
 

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/persistent_store_eeprom.cpp View File

@@ -40,7 +40,7 @@ bool PersistentStore::access_start() {
40 40
 }
41 41
 bool PersistentStore::access_finish() { return true; }
42 42
 
43
-bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
43
+bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
44 44
   while (size--) {
45 45
     uint8_t * const p = (uint8_t * const)pos;
46 46
     uint8_t v = *value;

+ 1
- 1
Marlin/src/HAL/HAL_STM32_F4_F7/persistent_store_eeprom.cpp View File

@@ -32,7 +32,7 @@
32 32
 bool PersistentStore::access_start() { return true; }
33 33
 bool PersistentStore::access_finish() { return true; }
34 34
 
35
-bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
35
+bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
36 36
   while (size--) {
37 37
     uint8_t * const p = (uint8_t * const)pos;
38 38
     uint8_t v = *value;

+ 1
- 1
Marlin/src/HAL/HAL_TEENSY31_32/persistent_store_impl.cpp View File

@@ -27,7 +27,7 @@
27 27
 bool PersistentStore::access_start() { return true; }
28 28
 bool PersistentStore::access_finish() { return true; }
29 29
 
30
-bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
30
+bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
31 31
   while (size--) {
32 32
     uint8_t * const p = (uint8_t * const)pos;
33 33
     uint8_t v = *value;

+ 1
- 1
Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_eeprom.cpp View File

@@ -33,7 +33,7 @@
33 33
 bool PersistentStore::access_start() { return true; }
34 34
 bool PersistentStore::access_finish() { return true; }
35 35
 
36
-bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
36
+bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
37 37
   while (size--) {
38 38
     uint8_t * const p = (uint8_t * const)pos;
39 39
     uint8_t v = *value;

+ 1
- 1
Marlin/src/HAL/shared/persistent_store_api.h View File

@@ -31,7 +31,7 @@ class PersistentStore {
31 31
 public:
32 32
   static bool access_start();
33 33
   static bool access_finish();
34
-  static bool write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc);
34
+  static bool write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc);
35 35
   static bool read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing=true);
36 36
   static size_t capacity();
37 37
 

+ 7
- 0
Marlin/src/lcd/language/language_en.h View File

@@ -1194,6 +1194,13 @@
1194 1194
 #ifndef MSG_INFO_PROTOCOL
1195 1195
   #define MSG_INFO_PROTOCOL                   _UxGT("Protocol")
1196 1196
 #endif
1197
+#ifndef MSG_INFO_RUNAWAY_OFF
1198
+  #define MSG_INFO_RUNAWAY_OFF                _UxGT("Runaway Watch: OFF")
1199
+#endif
1200
+#ifndef MSG_INFO_RUNAWAY_ON
1201
+  #define MSG_INFO_RUNAWAY_ON                 _UxGT("Runaway Watch: ON")
1202
+#endif
1203
+
1197 1204
 #ifndef MSG_CASE_LIGHT
1198 1205
   #define MSG_CASE_LIGHT                      _UxGT("Case Light")
1199 1206
 #endif

+ 44
- 0
Marlin/src/lcd/menu/menu_info.cpp View File

@@ -102,6 +102,7 @@ void menu_info_thermistors() {
102 102
   char buffer[21];  // for STATIC_PAIR_P
103 103
 
104 104
   START_SCREEN();
105
+
105 106
   #if EXTRUDERS
106 107
     #define THERMISTOR_ID TEMP_SENSOR_0
107 108
     #include "../thermistornames.h"
@@ -155,14 +156,57 @@ void menu_info_thermistors() {
155 156
     STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_5_MAXTEMP), SS_LEFT);
156 157
   #endif
157 158
 
159
+  #if EXTRUDERS
160
+  {
161
+    STATIC_ITEM(
162
+      #if WATCH_HOTENDS
163
+        MSG_INFO_RUNAWAY_ON
164
+      #else
165
+        MSG_INFO_RUNAWAY_OFF
166
+      #endif
167
+      , SS_LEFT
168
+    );
169
+  }
170
+  #endif
171
+
158 172
   #if HAS_HEATED_BED
173
+  {
159 174
     #undef THERMISTOR_ID
160 175
     #define THERMISTOR_ID TEMP_SENSOR_BED
161 176
     #include "../thermistornames.h"
162 177
     STATIC_ITEM("TBed:" THERMISTOR_NAME, SS_INVERT);
163 178
     STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(BED_MINTEMP), SS_LEFT);
164 179
     STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(BED_MAXTEMP), SS_LEFT);
180
+    STATIC_ITEM(
181
+      #if WATCH_BED
182
+        MSG_INFO_RUNAWAY_ON
183
+      #else
184
+        MSG_INFO_RUNAWAY_OFF
185
+      #endif
186
+      , SS_LEFT
187
+    );
188
+  }
189
+  #endif
190
+
191
+  #if HAS_HEATED_CHAMBER
192
+  {
193
+    #undef THERMISTOR_ID
194
+    #define THERMISTOR_ID TEMP_SENSOR_CHAMBER
195
+    #include "../thermistornames.h"
196
+    STATIC_ITEM("TCham:" THERMISTOR_NAME, SS_INVERT);
197
+    STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(CHAMBER_MINTEMP), SS_LEFT);
198
+    STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(CHAMBER_MAXTEMP), SS_LEFT);
199
+    STATIC_ITEM(
200
+      #if WATCH_CHAMBER
201
+        MSG_INFO_RUNAWAY_ON
202
+      #else
203
+        MSG_INFO_RUNAWAY_OFF
204
+      #endif
205
+      , SS_LEFT
206
+    );
207
+  }
165 208
   #endif
209
+
166 210
   END_SCREEN();
167 211
 }
168 212
 

Loading…
Cancel
Save