Andrew Klimenyuk / Mbed 2 deprecated STM32F103C8T6_WIFI_Heating_system

Dependencies:   mbed mbed-STM32F103C8T6 eeprom_flash Watchdog PinDetect DS1820

Revision:
54:61ccc1036944
Parent:
53:b9620bb0608e
Child:
55:3378972851fd
--- a/main.cpp	Sat Sep 29 07:43:40 2018 +0000
+++ b/main.cpp	Sat Sep 29 23:54:21 2018 +0000
@@ -19,6 +19,7 @@
 extern int temp_error[];
 extern float temp[];
 extern float simulated_temp[];
+extern int error_count;
 
 Serial  pc(PA_2, PA_3); // (TX, RX) Pin definition
 char a[128] = "";       // RX command buffer
@@ -125,6 +126,7 @@
             } else if (strncmp(a,"AT set mode ",12) == 0) {            
                 x= (int)a[12] - 48;                    
                 working_mode = ( x >= 0 && x <=6 ) ? x : working_mode;
+                error_count = 0;
                 pc.printf("%d\r\n", working_mode);                
             } else if (strncmp(a,"AT set sim temp ", 16) == 0) {
                 // from a[16] "t0|t1|t2|t3|t4\0"