YRL Maze lab made more script-y

Dependencies:   PsiSwarmLab-ScriptingBased mbed

Fork of UKESF_Lab by UKESF Headstart Summer School

Revision:
10:1b09d4bb847b
Parent:
9:085e090e1ec1
Child:
11:7b3ee540ba56
--- a/main.h	Mon Oct 26 11:16:05 2015 +0000
+++ b/main.h	Mon Oct 26 23:58:08 2015 +0000
@@ -17,7 +17,9 @@
 #ifndef MAIN_H
 #define MAIN_H
 
+#include "psiswarm.h"
 #include "beacon.h"
+#include "programs.h"
 
 // Define the on-period for a IR pulse in microseconds (eg 50000 for 2Hz system, 20000 for a 5Hz system)
 #define BEACON_PERIOD 25000        
@@ -25,10 +27,22 @@
 extern char beacon_found;                       // This will be a 1 if beacon is detected, 0 if it isn't 
 extern int beacon_heading;                      // The heading from the last time the beacon was detected
 extern char robots_found[8];                    // These will be a 1 when the respective robot [excluding self] was detected during the previous 500ms window
-extern int robots_heading[8];                  // These are the headings from the last time the respective robots were detected
+extern int robots_heading[8];                   // These are the headings from the last time the respective robots were detected
 extern unsigned short robots_distance[8];       // This is the maximum sensor value from the last time the respective robot was detected
 extern unsigned short reflected_sensor_data[8]; // The reflected IR values when this robots emitters are on
 extern unsigned short background_sensor_data[8];// The raw IR values when no robot (or beacon) should have its IR on
+extern char disable_ir_emitters; 
+extern char step_cycle;
+extern char target_reached;
+extern char recharging_state;
+extern char prog_name [17];
+extern char prog_info [17];
+extern char main_program_state;
+extern char program_changed;   
+
+char * get_program_name(int index);
+void set_program(int index);
+void set_program_info(char * info);
 
 void update_display(void);
 void display_debug_info(void);
@@ -39,7 +53,6 @@
 int main(void);
 
 
-void head_to_bearing_program(int target_bearing);
 
 void display_ir_readings(void);
 void out(const char* format, ...) ;