with the tof code
Dependencies: mbed Servo ros_lib_kinetic
Diff: Motors/Motor.cpp
- Revision:
- 3:df6160e2f6d9
- Parent:
- 2:6197e1cf2cd1
- Child:
- 4:36a04230554d
--- a/Motors/Motor.cpp Thu Oct 24 14:24:27 2019 +0000 +++ b/Motors/Motor.cpp Thu Oct 24 14:37:51 2019 +0000 @@ -45,3 +45,15 @@ _rev = 1; _pwm = speed; } + +/*-------------------------------------------------------------------------------- +Function name: Stop +Input Parameters: N/A +Output Parameters: N/A +Description: Drives the motor backwards at a designated speed +----------------------------------------------------------------------------------*/ +void cMotor::Stop(){ + _fwd = 0; + _rev = 0; + _pwm = 0; +} \ No newline at end of file