Display zeigt merkwürdige Zeichen

Dependencies:   mbed PinDetect TextLCD

Fork of FWFSU_Start_28102013 by KX-ONE

Revision:
15:16d4e268cb84
Parent:
14:90b2af48767a
Child:
16:78da467a0609
--- a/main.cpp	Wed Jul 27 06:44:43 2016 +0000
+++ b/main.cpp	Wed Jul 27 07:30:57 2016 +0000
@@ -102,6 +102,19 @@
 }
 
 /**
+ * Synchronize with the slave
+ */
+void resync( void ) {
+    ser.sendCode(MSG_CODE_TOTAL_RESET, NULL);
+    ser.flush();
+    btn_cnt = 0;
+    comm_flags = 0;
+    buzzer_state = 0;
+    button_state = 0;
+    D = 1;    
+}
+
+/**
  * Receive routine for serial data.
  * Must be attatched to the MsgSerial object.
  */
@@ -138,6 +151,9 @@
             case MSG_CODE_TOTAL_RESET:
                 // NOTHING
                 break;
+            case MSG_CODE_REQ_RES:
+                resync();
+                break;
             default:
                 rec_code = 0;
                 rec_buff[0] = 0;
@@ -146,19 +162,6 @@
     }
 }
 
-/**
- * Synchronize with the slave
- */
-void resync( void ) {
-    ser.sendCode(MSG_CODE_TOTAL_RESET, NULL);
-    ser.flush();
-    btn_cnt = 0;
-    comm_flags = 0;
-    buzzer_state = 0;
-    button_state = 0;
-    D = 1;    
-}
-
 void bzr_pressed( void ) {
     btn_control();
 }
@@ -208,7 +211,7 @@
     
     //start
     lowbatt();
-    ping();
+    //ping();
     ser.registerRecFc(&hdl_rec);
     resync();