errors_list.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. // Extracted from Prusa-Error-Codes repo
  2. // Subject to automation and optimization
  3. #pragma once
  4. #include "inttypes.h"
  5. #include "../language.h"
  6. #include <avr/pgmspace.h>
  7. namespace MMU2 {
  8. static constexpr uint8_t ERR_MMU_CODE = 4;
  9. typedef enum : uint16_t {
  10. ERR_UNDEF = 0,
  11. ERR_MECHANICAL = 100,
  12. ERR_MECHANICAL_FINDA_DIDNT_TRIGGER,
  13. ERR_MECHANICAL_FINDA_DIDNT_SWITCH_OFF,
  14. ERR_MECHANICAL_FSENSOR_DIDNT_TRIGGER,
  15. ERR_MECHANICAL_FSENSOR_DIDNT_SWITCH_OFF,
  16. ERR_MECHANICAL_PULLEY_STALLED = 105,
  17. ERR_MECHANICAL_SELECTOR_CANNOT_HOME = 115,
  18. ERR_MECHANICAL_IDLER_CANNOT_HOME = 125,
  19. ERR_TEMPERATURE = 200,
  20. ERR_TEMPERATURE_TMC_PULLEY_OVER_TEMPERATURE_WARN = 201,
  21. ERR_TEMPERATURE_TMC_SELECTOR_OVER_TEMPERATURE_WARN = 211,
  22. ERR_TEMPERATURE_TMC_IDLER_OVER_TEMPERATURE_WARN = 221,
  23. ERR_TEMPERATURE_TMC_PULLEY_OVER_TEMPERATURE_ERROR = 202,
  24. ERR_TEMPERATURE_TMC_SELECTOR_OVER_TEMPERATURE_ERROR = 212,
  25. ERR_TEMPERATURE_TMC_IDLER_OVER_TEMPERATURE_ERROR = 222,
  26. ERR_ELECTRICAL = 300,
  27. ERR_ELECTRICAL_TMC_PULLEY_DRIVER_ERROR = 301,
  28. ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_ERROR = 311,
  29. ERR_ELECTRICAL_TMC_IDLER_DRIVER_ERROR = 321,
  30. ERR_ELECTRICAL_TMC_PULLEY_DRIVER_RESET = 302,
  31. ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_RESET = 312,
  32. ERR_ELECTRICAL_TMC_IDLER_DRIVER_RESET = 322,
  33. ERR_ELECTRICAL_TMC_PULLEY_UNDERVOLTAGE_ERROR = 303,
  34. ERR_ELECTRICAL_TMC_SELECTOR_UNDERVOLTAGE_ERROR = 313,
  35. ERR_ELECTRICAL_TMC_IDLER_UNDERVOLTAGE_ERROR = 323,
  36. ERR_ELECTRICAL_TMC_PULLEY_DRIVER_SHORTED = 304,
  37. ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_SHORTED = 314,
  38. ERR_ELECTRICAL_TMC_IDLER_DRIVER_SHORTED = 324,
  39. ERR_CONNECT = 400,
  40. ERR_CONNECT_MMU_NOT_RESPONDING = 401,
  41. ERR_CONNECT_COMMUNICATION_ERROR = 402,
  42. ERR_SYSTEM = 500,
  43. ERR_SYSTEM_FILAMENT_ALREADY_LOADED = 501,
  44. ERR_SYSTEM_INVALID_TOOL = 502,
  45. ERR_SYSTEM_QUEUE_FULL = 503,
  46. ERR_SYSTEM_VERSION_MISMATCH = 504,
  47. ERR_SYSTEM_RUNTIME_ERROR = 505,
  48. ERR_OTHER = 900
  49. } err_num_t;
  50. // Avr gcc has serious trouble understanding static data structures in PROGMEM
  51. // and inadvertedly falls back to copying the whole structure into RAM (which is obviously unwanted).
  52. // But since this file ought to be generated in the future from yaml prescription,
  53. // it really makes no difference if there are "nice" data structures or plain arrays.
  54. static const uint16_t errorCodes[] PROGMEM = {
  55. ERR_MECHANICAL_FINDA_DIDNT_TRIGGER,
  56. ERR_MECHANICAL_FINDA_DIDNT_SWITCH_OFF,
  57. ERR_MECHANICAL_FSENSOR_DIDNT_TRIGGER,
  58. ERR_MECHANICAL_FSENSOR_DIDNT_SWITCH_OFF,
  59. ERR_MECHANICAL_PULLEY_STALLED,
  60. ERR_MECHANICAL_SELECTOR_CANNOT_HOME,
  61. ERR_MECHANICAL_IDLER_CANNOT_HOME,
  62. ERR_TEMPERATURE_TMC_PULLEY_OVER_TEMPERATURE_WARN,
  63. ERR_TEMPERATURE_TMC_SELECTOR_OVER_TEMPERATURE_WARN,
  64. ERR_TEMPERATURE_TMC_IDLER_OVER_TEMPERATURE_WARN,
  65. ERR_TEMPERATURE_TMC_PULLEY_OVER_TEMPERATURE_ERROR,
  66. ERR_TEMPERATURE_TMC_SELECTOR_OVER_TEMPERATURE_ERROR,
  67. ERR_TEMPERATURE_TMC_IDLER_OVER_TEMPERATURE_ERROR,
  68. ERR_ELECTRICAL_TMC_PULLEY_DRIVER_ERROR,
  69. ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_ERROR,
  70. ERR_ELECTRICAL_TMC_IDLER_DRIVER_ERROR,
  71. ERR_ELECTRICAL_TMC_PULLEY_DRIVER_RESET,
  72. ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_RESET,
  73. ERR_ELECTRICAL_TMC_IDLER_DRIVER_RESET,
  74. ERR_ELECTRICAL_TMC_PULLEY_UNDERVOLTAGE_ERROR,
  75. ERR_ELECTRICAL_TMC_SELECTOR_UNDERVOLTAGE_ERROR,
  76. ERR_ELECTRICAL_TMC_IDLER_UNDERVOLTAGE_ERROR,
  77. ERR_ELECTRICAL_TMC_PULLEY_DRIVER_SHORTED,
  78. ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_SHORTED,
  79. ERR_ELECTRICAL_TMC_IDLER_DRIVER_SHORTED,
  80. ERR_CONNECT_MMU_NOT_RESPONDING,
  81. ERR_CONNECT_COMMUNICATION_ERROR,
  82. ERR_SYSTEM_FILAMENT_ALREADY_LOADED,
  83. ERR_SYSTEM_INVALID_TOOL,
  84. ERR_SYSTEM_QUEUE_FULL,
  85. ERR_SYSTEM_VERSION_MISMATCH,
  86. ERR_SYSTEM_RUNTIME_ERROR,
  87. };
  88. // @@TODO some of the strings are duplicates, can be merged into one
  89. static const char titleFINDA_DIDNT_TRIGGER[] PROGMEM_I1 = ISTR("FINDA NOT ON");
  90. static const char titleFINDA_DIDNT_SWITCH_OFF[] PROGMEM_I1 = ISTR("FINDA NOT OFF");
  91. static const char titleFSENSOR_DIDNT_TRIGGER[] PROGMEM_I1 = ISTR("FSENSOR NOT ON");
  92. static const char titleFSENSOR_DIDNT_SWITCH_OFF[] PROGMEM_I1 = ISTR("FSENSOR NOT OFF");
  93. static const char titlePULLEY_STALLED[] PROGMEM_I1 = ISTR("PULLEY STALLED");
  94. static const char titleSELECTOR_CANNOT_HOME[] PROGMEM_I1 = ISTR("SELECTOR CAN'T HOME");
  95. static const char titleIDLER_CANNOT_HOME[] PROGMEM_I1 = ISTR("IDLER CANNOT HOME");
  96. static const char titleTMC_PULLEY_OVER_TEMPERATURE_WARN[] PROGMEM_I1 = ISTR("TMC TOO HOT");
  97. static const char titleTMC_SELECTOR_OVER_TEMPERATURE_WARN[] PROGMEM_I1 = ISTR("TMC TOO HOT");
  98. static const char titleTMC_IDLER_OVER_TEMPERATURE_WARN[] PROGMEM_I1 = ISTR("TMC TOO HOT");
  99. static const char titleTMC_PULLEY_OVER_TEMPERATURE_ERROR[] PROGMEM_I1 = ISTR("TMC OVERHEAT ERROR");
  100. static const char titleTMC_SELECTOR_OVER_TEMPERATURE_ERROR[] PROGMEM_I1 = ISTR("TMC OVERHEAT ERROR");
  101. static const char titleTMC_IDLER_OVER_TEMPERATURE_ERROR[] PROGMEM_I1 = ISTR("TMC OVERHEAT ERROR");
  102. static const char titleTMC_PULLEY_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC DRIVER ERROR");
  103. static const char titleTMC_SELECTOR_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC DRIVER ERROR");
  104. static const char titleTMC_IDLER_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC DRIVER ERROR");
  105. static const char titleTMC_PULLEY_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC DRIVER RESET");
  106. static const char titleTMC_SELECTOR_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC DRIVER RESET");
  107. static const char titleTMC_IDLER_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC DRIVER RESET");
  108. static const char titleTMC_PULLEY_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("TMC UNDERVOLT ERROR");
  109. static const char titleTMC_SELECTOR_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("TMC UNDERVOLT ERROR");
  110. static const char titleTMC_IDLER_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("TMC UNDERVOLT ERROR");
  111. static const char titleTMC_PULLEY_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("TMC DRIVER SHORTED");
  112. static const char titleTMC_SELECTOR_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("TMC DRIVER SHORTED");
  113. static const char titleTMC_IDLER_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("TMC DRIVER SHORTED");
  114. static const char titleMMU_NOT_RESPONDING[] PROGMEM_I1 = ISTR("MMU NOT RESPONDING");
  115. static const char titleCOMMUNICATION_ERROR[] PROGMEM_I1 = ISTR("COMMUNICATION ERROR");
  116. static const char titleFILAMENT_ALREADY_LOADED[] PROGMEM_I1 = ISTR("ALREADY LOADED");
  117. static const char titleINVALID_TOOL[] PROGMEM_I1 = ISTR("INVALID TOOL");
  118. static const char titleQUEUE_FULL[] PROGMEM_I1 = ISTR("QUEUE FULL");
  119. static const char titleVERSION_MISMATCH[] PROGMEM_I1 = ISTR("FW VERSION MISMATCH");
  120. static const char titleRUNTIME_ERROR[] PROGMEM_I1 = ISTR("FW RUNTIME ERROR");
  121. static const char * const errorTitles [] PROGMEM = {
  122. titleFINDA_DIDNT_TRIGGER,
  123. titleFINDA_DIDNT_SWITCH_OFF,
  124. titleFSENSOR_DIDNT_TRIGGER,
  125. titleFSENSOR_DIDNT_SWITCH_OFF,
  126. titlePULLEY_STALLED,
  127. titleSELECTOR_CANNOT_HOME,
  128. titleIDLER_CANNOT_HOME,
  129. titleTMC_PULLEY_OVER_TEMPERATURE_WARN,
  130. titleTMC_SELECTOR_OVER_TEMPERATURE_WARN,
  131. titleTMC_IDLER_OVER_TEMPERATURE_WARN,
  132. titleTMC_PULLEY_OVER_TEMPERATURE_ERROR,
  133. titleTMC_SELECTOR_OVER_TEMPERATURE_ERROR,
  134. titleTMC_IDLER_OVER_TEMPERATURE_ERROR,
  135. titleTMC_PULLEY_DRIVER_ERROR,
  136. titleTMC_SELECTOR_DRIVER_ERROR,
  137. titleTMC_IDLER_DRIVER_ERROR,
  138. titleTMC_PULLEY_DRIVER_RESET,
  139. titleTMC_SELECTOR_DRIVER_RESET,
  140. titleTMC_IDLER_DRIVER_RESET,
  141. titleTMC_PULLEY_UNDERVOLTAGE_ERROR,
  142. titleTMC_SELECTOR_UNDERVOLTAGE_ERROR,
  143. titleTMC_IDLER_UNDERVOLTAGE_ERROR,
  144. titleTMC_PULLEY_DRIVER_SHORTED,
  145. titleTMC_SELECTOR_DRIVER_SHORTED,
  146. titleTMC_IDLER_DRIVER_SHORTED,
  147. titleMMU_NOT_RESPONDING,
  148. titleCOMMUNICATION_ERROR,
  149. titleFILAMENT_ALREADY_LOADED,
  150. titleINVALID_TOOL,
  151. titleQUEUE_FULL,
  152. titleVERSION_MISMATCH,
  153. titleRUNTIME_ERROR,
  154. };
  155. // @@TODO looking at the texts, they can be composed of several parts and/or parametrized (could save a lot of space ;) )
  156. static const char descFINDA_DIDNT_TRIGGER[] PROGMEM_I1 = ISTR("FINDA didn't trigger while loading filament. Ensure that the steel FINDA ball can move freely and check the wiring.");
  157. static const char descFINDA_DIDNT_SWITCH_OFF[] PROGMEM_I1 = ISTR("FINDA didn't switch off while unloading filament. Try unloading the filament manually and ensure steel FINDA ball can move freely.");
  158. static const char descFSENSOR_DIDNT_TRIGGER[] PROGMEM_I1 = ISTR("Filament sensor didn't trigger while loading the filament. Check that the filament reached the fsensor and check the wiring.");
  159. static const char descFSENSOR_DIDNT_SWITCH_OFF[] PROGMEM_I1 = ISTR("Filament sensor didn't switch off while unloading the filament. The filament is probably stuck near the sensor or the sensor is malfunctioning.");
  160. static const char descPULLEY_STALLED[] PROGMEM_I1 = ISTR("The Pulley stalled - check for anything blocking the filament from being pushed/pulled to/from the extruder.");
  161. static const char descSELECTOR_CANNOT_HOME[] PROGMEM_I1 = ISTR("The Selector cannot home properly - check for anything blocking its movement.");
  162. static const char descIDLER_CANNOT_HOME[] PROGMEM_I1 = ISTR("The Idler cannot home properly - check for anything blocking its movement.");
  163. static const char descTMC_PULLEY_OVER_TEMPERATURE_WARN[] PROGMEM_I1 = ISTR("TMC driver for the Pulley motor is almost overheated. Make sure there is sufficient airflow near the MMU board.");
  164. static const char descTMC_SELECTOR_OVER_TEMPERATURE_WARN[] PROGMEM_I1 = ISTR("TMC driver for the Selector motor is almost overheated. Make sure there is sufficient airflow near the MMU board.");
  165. static const char descTMC_IDLER_OVER_TEMPERATURE_WARN[] PROGMEM_I1 = ISTR("TMC driver for the Idler motor is almost overheated. Make sure there is sufficient airflow near the MMU board.");
  166. static const char descTMC_PULLEY_OVER_TEMPERATURE_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Pulley motor is overheated. Cool down the MMU board and restart MMU.");
  167. static const char descTMC_SELECTOR_OVER_TEMPERATURE_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Selector motor is overheated. Cool down the MMU board and restart MMU.");
  168. static const char descTMC_IDLER_OVER_TEMPERATURE_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Idler motor is overheated. Cool down the MMU board and restart MMU.");
  169. static const char descTMC_PULLEY_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Pulley motor is not responding. Try restarting the MMU. If the issue persist contact the support.");
  170. static const char descTMC_SELECTOR_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Selector motor is not responding. Try restarting the MMU. If the issue persist contact the support.");
  171. static const char descTMC_IDLER_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Idler motor is not responding. Try restarting the MMU. If the issue persist contact the support.");
  172. static const char descTMC_PULLEY_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC driver for the Pulley motor was restarted. There is probably an issue with the electronics. Check the wiring and connectors.");
  173. static const char descTMC_SELECTOR_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC driver for the Selector motor was restarted. There is probably an issue with the electronics. Check the wiring and connectors.");
  174. static const char descTMC_IDLER_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC driver for the Idler motor was restarted. There is probably an issue with the electronics. Check the wiring and connectors.");
  175. static const char descTMC_PULLEY_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("Not enough current for the Pulley TMC driver. There is probably an issue with the electronics. Check the wiring and connectors.");
  176. static const char descTMC_SELECTOR_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("Not enough current for the Selector TMC driver. There is probably an issue with the electronics. Check the wiring and connectors.");
  177. static const char descTMC_IDLER_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("Not enough current for the Idler TMC driver. There is probably an issue with the electronics. Check the wiring and connectors.");
  178. static const char descTMC_PULLEY_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("Short circuit on the Pulley TMC driver. Check the wiring and connectors. If the issue persist contact the support.");
  179. static const char descTMC_SELECTOR_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("Short circuit on the Selector TMC driver. Check the wiring and connectors. If the issue persist contact the support.");
  180. static const char descTMC_IDLER_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("Short circuit on the Idler TMC driver. Check the wiring and connectors. If the issue persist contact the support.");
  181. static const char descMMU_NOT_RESPONDING[] PROGMEM_I1 = ISTR("MMU unit not responding. Check the wiring and connectors. If the issue persist contact the support.");
  182. static const char descCOMMUNICATION_ERROR[] PROGMEM_I1 = ISTR("MMU unit not responding correctly. Check the wiring and connectors. If the issue persist contact the support.");
  183. static const char descFILAMENT_ALREADY_LOADED[] PROGMEM_I1 = ISTR("Cannot perform the action, filament is already loaded. Unload it first.");
  184. static const char descINVALID_TOOL[] PROGMEM_I1 = ISTR("Requested filament tool is not available on this hardware. Check the G-code file for possible issue.");
  185. static const char descQUEUE_FULL[] PROGMEM_I1 = ISTR("Internal runtime error of the firmware, please restart the MMU.");
  186. static const char descVERSION_MISMATCH[] PROGMEM_I1 = ISTR("The MMU unit reports its FW version incompatible with the printer's firmware. Make sure the MMU firmware is up to date.");
  187. static const char descRUNTIME_ERROR[] PROGMEM_I1 = ISTR("Internal runtime error. Try restarting the MMU unit or updating the firmware. If the issue persist contact the support.");
  188. static const char * const errorDescs[] PROGMEM = {
  189. descFINDA_DIDNT_TRIGGER,
  190. descFINDA_DIDNT_SWITCH_OFF,
  191. descFSENSOR_DIDNT_TRIGGER,
  192. descFSENSOR_DIDNT_SWITCH_OFF,
  193. descPULLEY_STALLED,
  194. descSELECTOR_CANNOT_HOME,
  195. descIDLER_CANNOT_HOME,
  196. descTMC_PULLEY_OVER_TEMPERATURE_WARN,
  197. descTMC_SELECTOR_OVER_TEMPERATURE_WARN,
  198. descTMC_IDLER_OVER_TEMPERATURE_WARN,
  199. descTMC_PULLEY_OVER_TEMPERATURE_ERROR,
  200. descTMC_SELECTOR_OVER_TEMPERATURE_ERROR,
  201. descTMC_IDLER_OVER_TEMPERATURE_ERROR,
  202. descTMC_PULLEY_DRIVER_ERROR,
  203. descTMC_SELECTOR_DRIVER_ERROR,
  204. descTMC_IDLER_DRIVER_ERROR,
  205. descTMC_PULLEY_DRIVER_RESET,
  206. descTMC_SELECTOR_DRIVER_RESET,
  207. descTMC_IDLER_DRIVER_RESET,
  208. descTMC_PULLEY_UNDERVOLTAGE_ERROR,
  209. descTMC_SELECTOR_UNDERVOLTAGE_ERROR,
  210. descTMC_IDLER_UNDERVOLTAGE_ERROR,
  211. descTMC_PULLEY_DRIVER_SHORTED,
  212. descTMC_SELECTOR_DRIVER_SHORTED,
  213. descTMC_IDLER_DRIVER_SHORTED,
  214. descMMU_NOT_RESPONDING,
  215. descCOMMUNICATION_ERROR,
  216. descFILAMENT_ALREADY_LOADED,
  217. descINVALID_TOOL,
  218. descQUEUE_FULL,
  219. descVERSION_MISMATCH,
  220. descRUNTIME_ERROR,
  221. };
  222. /// Will be mapped onto dialog button responses in the FW
  223. /// Those responses have their unique+translated texts as well
  224. enum class ButtonOperations : uint8_t {
  225. NoOperation,
  226. Retry,
  227. SlowLoad,
  228. Continue,
  229. RestartMMU,
  230. Unload,
  231. StopPrint,
  232. DisableMMU,
  233. };
  234. // we have max 3 buttons/operations to select from
  235. // one of them is "More" to show the explanation text normally hidden in the next screens.
  236. // 01234567890123456789
  237. // >bttxt >bttxt >MoreW
  238. // Therefore at least some of the buttons, which can occur on the screen together, need to be 5-chars long max @@TODO.
  239. // @@TODO beware - this doesn't correspond to the HW MMU buttons - needs to be discussed
  240. static const char btnRetry[] PROGMEM_I1 = ISTR("Retry");
  241. static const char btnSlowLoad[] PROGMEM_I1 = ISTR("Slow");
  242. static const char btnContinue[] PROGMEM_I1 = ISTR("Done");
  243. static const char btnRestartMMU[] PROGMEM_I1 = ISTR("RstMMU");
  244. static const char btnUnload[] PROGMEM_I1 = ISTR("Unload");
  245. static const char btnStop[] PROGMEM_I1 = ISTR("Stop");
  246. static const char btnDisableMMU[] PROGMEM_I1 = ISTR("Disable");
  247. static const char btnMore[] PROGMEM_I1 = ISTR("More"); // @@TODO add that downwards facing >> character
  248. // We have 8 different operations/buttons at this time, so we need at least 4 bits to encode each.
  249. // Since one of the buttons is always "More", we can skip that one.
  250. // Therefore we need just 1 byte to describe the necessary buttons for each screen.
  251. uint8_t constexpr Btns(ButtonOperations b0, ButtonOperations b1){
  252. return ((uint8_t)b1) << 4 | ((uint8_t)b0);
  253. }
  254. static const uint8_t errorButtons[] PROGMEM = {
  255. Btns(ButtonOperations::Retry, ButtonOperations::Continue),
  256. Btns(ButtonOperations::Retry, ButtonOperations::Continue),
  257. Btns(ButtonOperations::Retry, ButtonOperations::Continue),
  258. Btns(ButtonOperations::Retry, ButtonOperations::Continue),
  259. Btns(ButtonOperations::NoOperation, ButtonOperations::Continue),
  260. Btns(ButtonOperations::NoOperation, ButtonOperations::Continue),
  261. Btns(ButtonOperations::NoOperation, ButtonOperations::Continue),
  262. Btns(ButtonOperations::Continue, ButtonOperations::RestartMMU),
  263. Btns(ButtonOperations::Continue, ButtonOperations::RestartMMU),
  264. Btns(ButtonOperations::Continue, ButtonOperations::RestartMMU),
  265. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  266. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  267. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  268. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  269. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  270. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  271. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  272. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  273. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  274. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  275. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  276. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  277. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  278. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  279. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  280. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  281. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  282. Btns(ButtonOperations::Unload, ButtonOperations::Continue),
  283. Btns(ButtonOperations::StopPrint, ButtonOperations::RestartMMU),
  284. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  285. Btns(ButtonOperations::NoOperation, ButtonOperations::DisableMMU),
  286. Btns(ButtonOperations::NoOperation, ButtonOperations::RestartMMU),
  287. };
  288. } // namespace MMU2