Mid level control code

Dependencies:   ros_lib_kinetic

Revision:
24:bc852aa89e7a
Parent:
22:82871f00f89d
Child:
26:7c59002c9cd7
--- a/LLComms.h	Fri Dec 14 09:58:24 2018 +0000
+++ b/LLComms.h	Mon Dec 17 14:34:37 2018 +0000
@@ -26,16 +26,16 @@
         EventQueue queue;
         Mutex mutChannel[N_CHANNELS];
         bool isDataReady[N_CHANNELS]; // Flag to indicate path data is ready for transmission to low level.
-        int demandPosition[N_CHANNELS];  // 13-bit value to be sent to the actuator
-        int demandSpeed[N_CHANNELS];  // 13-bit value to be sent to the actuator
+        double demandPosition[N_CHANNELS];
+        double demandSpeed[N_CHANNELS];
         char chrErrorFlag[N_CHANNELS]; // 3 error bits from LL
         double positionSensor_m[N_CHANNELS]; // The actual chamber lengths in meters given as the change in length relative to neutral (should always be >=0)
         double pressureSensor_bar[N_CHANNELS];  // The pressure in a given chamber in bar (1 bar  = 100,000 Pa)
         
         LLComms(); // Constructor
         //~LLComms(); // Destructor
-        double ReadADCPosition_mtrs(int channel);
-        double ReadADCPressure_bar(int channel);
+        /*double ReadADCPosition_mtrs(int channel);
+        double ReadADCPressure_bar(int channel);*/
     
     private:
     
@@ -58,6 +58,7 @@
         
         int ThreadID[N_CHANNELS];
         
+        void formatMessage(short int type, int value);
         void SendReceiveData(int channel);
         void common_rise_handler(int channel);
         void common_fall_handler(int channel);