UVic Assistive Technology Lab / Mbed 2 deprecated DSLR_Camera_Gimbal

Dependencies:   mbed ros_lib_kinetic

Revision:
2:0537a8007a39
Parent:
1:1ac7d472cfa2
Child:
4:89ebfa37663b
--- a/main.cpp	Tue Feb 06 20:50:55 2018 +0000
+++ b/main.cpp	Thu Feb 08 22:23:40 2018 +0000
@@ -25,18 +25,12 @@
 DigitalOut          LED(PA_5);
 PwmOut              liftSpeed(D10); // Normally D10
 DigitalOut          liftDirection(D11);
-//DigitalIn           hallSensor1(D9);
-//DigitalIn           hallSensor2(D12);
 DigitalIn           button(USER_BUTTON);
 Ticker              hallInt;
-Ticker              dynaInt;
-Ticker              imuInt;
-Ticker              rosInt;
-Ticker              liftInt;
 Timer               filter_hall1;
-BNO055              IMU(D14, D15);
 DynamixelClass      gimbal(57600, D7, D8, D2);
 
+
 ros::NodeHandle     nh;
 ros::Subscriber<std_msgs::Float32MultiArray> sub("module_command", &module_commandCB);
 
@@ -44,22 +38,19 @@
 // Variables
 struct          fields control;
 struct          fields rosInput;
-bool            liftFlag = 0;
-bool            motorFlag = 0;
-bool            homeFlag = 0;
-bool            imuFlag = 0;
-bool            rosFlag = 0;
 volatile int    currentPosition = 0;
 int             prevPosition = 0;
 bool            stall = false;
 
+
 // Main Program
 int main() {
     // Initializations
-    filter_hall1.start();                       //Start Filtering Timer
-    setupGimbal();
+    filter_hall1.start();                       //Start Filtering Timer 
+    setupGimbal();                              // Gimbal
     setupLift();                                // Lift
     setupROSNode(nh, sub);                      // ROS Node Handle
+    
     // Main Loop
     while (1) {     
         // Lift Operation
@@ -68,6 +59,6 @@
         runGimbal();
         //ROS Functions 
         nh.spinOnce();  
-        rosCheck();              
+        rosCheck();      
     }
 }