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
   return true;
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
   while (size--) {
48
   while (size--) {
49
     uint8_t * const p = (uint8_t * const)pos;
49
     uint8_t * const p = (uint8_t * const)pos;
50
     uint8_t v = *value;
50
     uint8_t v = *value;

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

72
   return true;
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
   if (!eeprom_file.seek(pos)) return true; // return true for any error
76
   if (!eeprom_file.seek(pos)) return true; // return true for any error
77
   if (eeprom_file.write(value, size) != size) return true;
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
   return true;
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
   for (size_t i = 0; i < size; i++) ram_eeprom[pos + i] = value[i];
113
   for (size_t i = 0; i < size; i++) ram_eeprom[pos + i] = value[i];
114
   eeprom_dirty = true;
114
   eeprom_dirty = true;
115
   crc16(crc, value, size);
115
   crc16(crc, value, size);

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

58
   return true;
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
   #if NONE(SPI_EEPROM, I2C_EEPROM)
62
   #if NONE(SPI_EEPROM, I2C_EEPROM)
63
     if (NVMCTRL->SEESTAT.bit.RLOCK)
63
     if (NVMCTRL->SEESTAT.bit.RLOCK)
64
       NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_USEE);    // Unlock E2P data write access
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
   return true;
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
   while (size--) {
54
   while (size--) {
55
     uint8_t v = *value;
55
     uint8_t v = *value;
56
 
56
 

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

40
 }
40
 }
41
 bool PersistentStore::access_finish() { return true; }
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
   while (size--) {
44
   while (size--) {
45
     uint8_t * const p = (uint8_t * const)pos;
45
     uint8_t * const p = (uint8_t * const)pos;
46
     uint8_t v = *value;
46
     uint8_t v = *value;

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

32
 bool PersistentStore::access_start() { return true; }
32
 bool PersistentStore::access_start() { return true; }
33
 bool PersistentStore::access_finish() { return true; }
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
   while (size--) {
36
   while (size--) {
37
     uint8_t * const p = (uint8_t * const)pos;
37
     uint8_t * const p = (uint8_t * const)pos;
38
     uint8_t v = *value;
38
     uint8_t v = *value;

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

27
 bool PersistentStore::access_start() { return true; }
27
 bool PersistentStore::access_start() { return true; }
28
 bool PersistentStore::access_finish() { return true; }
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
   while (size--) {
31
   while (size--) {
32
     uint8_t * const p = (uint8_t * const)pos;
32
     uint8_t * const p = (uint8_t * const)pos;
33
     uint8_t v = *value;
33
     uint8_t v = *value;

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

33
 bool PersistentStore::access_start() { return true; }
33
 bool PersistentStore::access_start() { return true; }
34
 bool PersistentStore::access_finish() { return true; }
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
   while (size--) {
37
   while (size--) {
38
     uint8_t * const p = (uint8_t * const)pos;
38
     uint8_t * const p = (uint8_t * const)pos;
39
     uint8_t v = *value;
39
     uint8_t v = *value;

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

31
 public:
31
 public:
32
   static bool access_start();
32
   static bool access_start();
33
   static bool access_finish();
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
   static bool read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing=true);
35
   static bool read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing=true);
36
   static size_t capacity();
36
   static size_t capacity();
37
 
37
 

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

1194
 #ifndef MSG_INFO_PROTOCOL
1194
 #ifndef MSG_INFO_PROTOCOL
1195
   #define MSG_INFO_PROTOCOL                   _UxGT("Protocol")
1195
   #define MSG_INFO_PROTOCOL                   _UxGT("Protocol")
1196
 #endif
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
 #ifndef MSG_CASE_LIGHT
1204
 #ifndef MSG_CASE_LIGHT
1198
   #define MSG_CASE_LIGHT                      _UxGT("Case Light")
1205
   #define MSG_CASE_LIGHT                      _UxGT("Case Light")
1199
 #endif
1206
 #endif

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

102
   char buffer[21];  // for STATIC_PAIR_P
102
   char buffer[21];  // for STATIC_PAIR_P
103
 
103
 
104
   START_SCREEN();
104
   START_SCREEN();
105
+
105
   #if EXTRUDERS
106
   #if EXTRUDERS
106
     #define THERMISTOR_ID TEMP_SENSOR_0
107
     #define THERMISTOR_ID TEMP_SENSOR_0
107
     #include "../thermistornames.h"
108
     #include "../thermistornames.h"
155
     STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_5_MAXTEMP), SS_LEFT);
156
     STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_5_MAXTEMP), SS_LEFT);
156
   #endif
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
   #if HAS_HEATED_BED
172
   #if HAS_HEATED_BED
173
+  {
159
     #undef THERMISTOR_ID
174
     #undef THERMISTOR_ID
160
     #define THERMISTOR_ID TEMP_SENSOR_BED
175
     #define THERMISTOR_ID TEMP_SENSOR_BED
161
     #include "../thermistornames.h"
176
     #include "../thermistornames.h"
162
     STATIC_ITEM("TBed:" THERMISTOR_NAME, SS_INVERT);
177
     STATIC_ITEM("TBed:" THERMISTOR_NAME, SS_INVERT);
163
     STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(BED_MINTEMP), SS_LEFT);
178
     STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(BED_MINTEMP), SS_LEFT);
164
     STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(BED_MAXTEMP), SS_LEFT);
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
   #endif
208
   #endif
209
+
166
   END_SCREEN();
210
   END_SCREEN();
167
 }
211
 }
168
 
212
 

Loading…
Cancel
Save