Petter Bellander / Mbed 2 deprecated Saab-BT

Dependencies:   mbed

Revision:
16:7bb8b161e00b
Parent:
15:82c3cc87bd02
diff -r 82c3cc87bd02 -r 7bb8b161e00b main.cpp
--- a/main.cpp	Sun Feb 07 18:24:13 2016 +0000
+++ b/main.cpp	Fri Mar 18 20:58:36 2016 +0000
@@ -5,6 +5,15 @@
 
 // Due to power saving functions special firmware required http://mbed.org/users/simon/notebook/interface-powerdown/
 
+/**** TODO ****
+Fix sleep mode
+Implement caller ID retreival
+Change some public functions to private for both CDC & RN52
+Instead of sending &res to RN52, add public variables for all data to be communicated
+rn52.check_event should return event instead of writing to res, (remove if and use switch directly in handle_bt_input
+
+**** END TODO****/
+
 #include "mbed.h"
 #include "PowerControl/PowerControl.h"
 #include "PowerControl/EthernetPowerControl.h"
@@ -12,7 +21,6 @@
 #include "CDC.h"
 #include "RN52.h"
 
-
 CDC cdc;
 RN52 rn52;
 RN52_RESULT res;
@@ -63,16 +71,6 @@
                 rn52.enable();
             }
         }
-        while(pc.readable()) {
-            switch (pc.getc()) {
-                case '1':
-                    printf("enabling\r\n");
-                    active = 1;
-                    cdc.enable();
-                    rn52.enable();
-                    break;    
-            }
-        }
     }
 }
 
@@ -175,7 +173,6 @@
                     case RN52_CONNECTED:
                         cdc.display("BT ANSLUTEN");
                         rn52.maxvolume();
-                        rn52.toggle_play();
                         break;
                     case RN52_AUDIO_STREAMING:
                         cdc.display(res.title);