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: lift.cpp
- Revision:
- 6:2ffa254e8f6e
- Parent:
- 4:89ebfa37663b
- Child:
- 7:950b3c3b5a2b
--- a/lift.cpp Mon Mar 05 23:45:59 2018 +0000 +++ b/lift.cpp Tue Mar 06 21:44:07 2018 +0000 @@ -14,7 +14,7 @@ void runLift(void){ stallCheck(); -//Check If Arrived + //Check If Arrived if (abs(control.height - currentPosition) < 5){ liftSpeed.write(0); stopHallInt(); @@ -25,7 +25,7 @@ startHallInt(); startFlag = 1; } -// Set direction + // Set direction if(control.height > currentPosition){ liftDirection.write(LIFTUP); } @@ -36,6 +36,7 @@ } } +//Determining if the lift stalled and stopping if it is void stallCheck(void){ if(stallcount > 3 && liftSpeed.read() > 0){ liftSpeed.write(0);