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:
- 4:89ebfa37663b
- Parent:
- 2:0537a8007a39
- Child:
- 6:2ffa254e8f6e
--- a/interrupts.cpp Thu Feb 08 22:55:15 2018 +0000
+++ b/interrupts.cpp Mon Mar 05 23:08:34 2018 +0000
@@ -1,15 +1,14 @@
#include "mbed.h"
#include <definitions.h>
-
//Stall Check Interrupt
void hallInterrupt(){
if(prevPosition == currentPosition){
- stall = true;
+ stallcount++;
}
- else{
+ else if(liftSpeed.read() > 0){
prevPosition = currentPosition;
- stall = false;
+ stallcount = 0;
}
}