Mid level control code

Dependencies:   ros_lib_kinetic

Revision:
10:1b6daba32452
Parent:
9:cd3607ba5643
Child:
11:7029367a1840
--- a/LLComms.h	Tue Aug 07 14:15:37 2018 +0000
+++ b/LLComms.h	Tue Aug 07 15:31:59 2018 +0000
@@ -36,18 +36,34 @@
         InterruptIn pinGate7;
         DigitalOut pinReset; // Reset pin for all controllers.
         
+        bool isDataReady[8]; // Flag to indicate path data is ready for transmission to low level.
         Mutex mutChannel[8];
         int ThreadID[8];
+        EventQueue queue;
         
-        char chrErrorFlag[8];// 3 error bits from LL
+        int demandPosition[8];  // 13-bit value to be sent to the actuator
+        char chrErrorFlag[8]; // 3 error bits from LL
         
         LLComms(int low_level_spi_frequency);
-        void reset(void);
-        //void SendReceiveData(int channel, int _intDemandPos_Tx[], bool *isDataReady[]);
-        
-/*void dcommon_fall_handler(int channel);
-void dfall0(void);
-void dSendReceiveData(int channel, int _intDemandPos_Tx[], bool (*_isDataReady)[8]);*/
+        void SendReceiveData(int channel);
+        void common_rise_handler(int channel);
+        void common_fall_handler(int channel);
+        void rise0(void);
+        void rise1(void);
+        void rise2(void);
+        void rise3(void);
+        void rise4(void);
+        void rise5(void);
+        void rise6(void);
+        void rise7(void);
+        void fall0(void);
+        void fall1(void);
+        void fall2(void);
+        void fall3(void);
+        void fall4(void);
+        void fall5(void);
+        void fall6(void);
+        void fall7(void);
     
     private: