UVic Assistive Technology Lab / Mbed 2 deprecated DSLR_Camera_Gimbal

Dependencies:   mbed ros_lib_kinetic

Revision:
7:950b3c3b5a2b
Parent:
6:2ffa254e8f6e
Child:
10:836e701d00a6
--- a/definitions.h	Tue Mar 06 21:44:07 2018 +0000
+++ b/definitions.h	Wed Mar 14 19:33:08 2018 +0000
@@ -11,12 +11,11 @@
 
 // ROS definitions
 #define     ROSDATALENGTH   5
-#define     ROSCONTROL      0
-#define     ROSYAW          1
-#define     ROSPITCH        2
-#define     ROSROLL         3
-#define     ROSHEIGHT       4
-#define     ROSMODE         5
+#define     ROSYAW          2
+#define     ROSPITCH        1
+#define     ROSROLL         0
+#define     ROSHEIGHT       3
+#define     ROSMODE         4
 
 // Gimbal definitions
 #define     YAWID           1
@@ -28,9 +27,9 @@
 #define     YAWMIN          0       // -177 degrees.
 #define     YAWMAX          4063    // +177 degrees.
 #define     PITCHMIN        1326    // -90 degrees.
-#define     PITCHMAX        2375    // +90 degrees is at 3374
-#define     ROLLMIN         1278    // -90 degrees. 
-#define     ROLLMAX         3374    // +90 degrees.
+#define     PITCHMAX        3000    // +90 degrees is at 3374
+#define     ROLLMIN         2100    // -90 degrees is at 1278
+#define     ROLLMAX         2500   // +90 degrees is at 3374 
 
 // Lift definitions
 #define     LIFTUP          0
@@ -40,37 +39,21 @@
 // Delta Height for Lift is 68cm
 
 // Classes
-struct  fields{
-int     yaw;
-int     yawSpeed;
-int     pitch;
-int     pitchSpeed;
-int     roll;
-int     rollSpeed;
-int     height;
-bool    stabilize;
-bool    masterOn;
-bool    liftRun;
-bool    gimbalRun;
-bool    shutdown;
-bool    initialize;
-int     mode;
-};
-struct  fields_float{
-float   yaw;
-float   yawSpeed;
-float   pitch;
-float   pitchSpeed;
-float   roll;
-float   rollSpeed;
-float   height;
-bool    stabilize;
-bool    masterOn;
-bool    liftRun;
-bool    gimbalRun;
-bool    shutdown;
-bool    initialize;
-bool    mode;
+struct fields{
+volatile int        yaw;
+int                 yawSpeed;
+volatile int        pitch;
+int                 pitchSpeed;
+volatile int        roll;
+int                 rollSpeed;
+volatile  int       height;
+bool                stabilize;
+bool                masterOn;
+bool                liftRun;
+bool                gimbalRun;
+bool                shutdown;
+bool                initialize;
+volatile int        mode;
 };
 
 extern struct           fields          control;