Projet S5 Info - Advanced

Dependencies:   TextLCD XBeeLib mbed-rtos mbed

Fork of Coordinateur by Vincent Belanger

Revision:
8:120807be23b8
Parent:
7:bd9bc9fa66c7
Child:
9:912506053afd
--- a/main.cpp	Mon Apr 11 20:37:07 2016 +0000
+++ b/main.cpp	Thu Apr 14 14:38:45 2016 +0000
@@ -65,9 +65,8 @@
     return 1.0/freq;
 }
 
-void timer_50swag()
+void timer_Signal()
 {
-    //thread_digital->signal_set(0x2);
     thread_menu->signal_set(0x2);
 }
 
@@ -79,27 +78,6 @@
         btn_e = button_enter;
         btn_n = button_next;
     }
-    /*
-    while(true)
-    {
-        Thread::signal_wait(0x2);
-        if(btn_b != button_back || btn_e != button_enter || btn_n != button_next)
-        {
-            Thread::signal_wait(0x2);
-            if(btn_b != button_back)
-            {
-                btn_b = button_back;
-            }
-            if(btn_e != button_enter)
-            {
-                btn_e = button_enter;
-            }
-            if(btn_n != button_next)
-            {
-                btn_n = button_next;
-            }
-        }
-    }*/
 }
 
 static void receive_cb(const RemoteXBeeZB& remote, bool broadcast, const uint8_t *const data, uint16_t len)
@@ -291,7 +269,7 @@
     xbee.register_receive_cb(&receive_cb);
     RadioStatus const radioStatus = xbee.init();
     
-    timer.attach_us(&timer_50swag, 100000);
+    timer.attach_us(&timer_Signal, 100000);
     thread_digital = new Thread(digitLect);
     thread_menu = new Thread(processMenu);
     MBED_ASSERT(radioStatus == Success);
@@ -299,11 +277,9 @@
     while (!xbee.is_joined()) {
         wait_ms(1000);
     }
-    pc.printf("Xbee joined\r\n");
 
     lcd.printf("Make a Selection:");
 
-    pc.printf("Begin loop\r\n");
     while (true) {
         xbee.process_rx_frames();
         wait_ms(10);