Touch screen drivers control dashboard for miniature locomotive. Features meters for speed, volts, power. Switches for lights, horns. Drives multiple STM3_ESC brushless motor controllers for complete brushless loco system as used in "The Brute" - www.jons-workshop.com
Dependencies: TS_DISCO_F746NG mbed Servo LCD_DISCO_F746NG BSP_DISCO_F746NG QSPI_DISCO_F746NG AsyncSerial FastPWM
Diff: error_handler.cpp
- Revision:
- 14:6bcec5ac21ca
- Parent:
- 12:a25bdf135348
--- a/error_handler.cpp Mon Jan 14 16:51:16 2019 +0000
+++ b/error_handler.cpp Mon Mar 04 17:47:27 2019 +0000
@@ -69,10 +69,21 @@
}
extern Serial pc;
-void error_handling_Jan_2019::report_any () {
+/*void error_handling_Jan_2019::report_any () {
for (int i = 0; i < NUMOF_REPORTABLE_TS_ERRORS; i++) {
if (TS_fault[i])
pc.printf ("Error report, number %d, value %d, %s\r\n", i, TS_fault[i], FaultList[i]);
}
}
+*/
+void error_handling_Jan_2019::report_any (bool retain) {
+ for (int i = 0; i < NUMOF_REPORTABLE_TS_ERRORS; i++) {
+ if (TS_fault[i]) {
+ pc.printf ("Error report, number %d, value %d, %s\r\n", i, TS_fault[i], FaultList[i]);
+ if (!retain)
+ TS_fault[i] = 0;
+ }
+ }
+}
+