UVic Assistive Technology Lab / Mbed 2 deprecated DSLR_Camera_Gimbal

Dependencies:   mbed ros_lib_kinetic

Revision:
1:1ac7d472cfa2
Parent:
0:3a767f41cf04
Child:
2:0537a8007a39
--- a/interrupts.cpp	Wed Jan 31 05:24:12 2018 +0000
+++ b/interrupts.cpp	Tue Feb 06 20:50:55 2018 +0000
@@ -1,7 +1,7 @@
 
 #include <definitions.h>
 
-void hallInterrupt(){
+void liftInterrupt(){
 
     liftFlag = 1;
 }
@@ -11,12 +11,17 @@
     motorFlag = 1;
 }
 
-void imuInterrupt(){
-    
-    imuFlag = 1;
-}
-
 void rosInterrupt(){
     
     rosFlag = 1;
 }
+
+void hallInterrupt(){
+    if(prevPosition == currentPosition){
+        stall = true;
+    }
+    else{
+        prevPosition = currentPosition;
+        stall  = false;          
+    }
+}