Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed ros_lib_kinetic
Diff: interrupts.cpp
- 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;
+ }
+}