C++ Library for the PsiSwarm Robot - Version 0.8

Dependents:   PsiSwarm_V8_Blank_CPP Autonomia_RndmWlk

Fork of PsiSwarmV7_CPP by Psi Swarm Robot

Revision:
14:d32d948f7a76
Parent:
12:878c6e9d9e60
Child:
15:be92991621b4
--- a/serial.cpp	Mon Oct 17 13:19:20 2016 +0000
+++ b/serial.cpp	Tue Jun 27 17:01:58 2017 +0000
@@ -1011,6 +1011,27 @@
             sprintf(ret_message,"%1.2f",pcb_version);
             send_message = 1;
             break;
+        case 125:
+            strcpy(command,"GET BEACON DATA");
+            if(allow_commands) {
+                command_status = 1;
+                beacon_data_needing = 1;
+            } else command_status = 2;
+            break;
+        case 126:
+            strcpy(command,"GET BACKGROUND  DATA");
+            if(allow_commands) {
+                command_status = 1;
+                beacon_data_needing = 2;
+            } else command_status = 2;
+            break;
+        case 127:
+            strcpy(command,"GET BOTH BEACON AND BACKGROUND  DATA");
+            if(allow_commands) {
+                command_status = 1;
+                beacon_data_needing = 3;
+            } else command_status = 2;
+            break;
     }
 
 
@@ -1205,19 +1226,6 @@
 }
 
 
-//void IF_bt_rx_callback()
-//{
-//    while(bt.readable()) {
-//        char byte = bt.getc();
-//
-//        bt_buffer[bt_buffer_index] = byte;
-//        bt_buffer_index++;
-//    }
-//
-//    bt_message_timeout.attach(&IF_bt_message_timeout, bt_message_timeout_period);
-//}
-
-
 void SerialControl::IF_set_filename(char * filename_in)
 {
     strcpy(filename,filename_in);