Odometry communication
Dependencies: PID QEI chair_BNO055 ros_lib_kinetic3
Dependents: wheelchaircontrolrealtime1
Fork of wheelchaircontrol by
Diff: wheelchair.cpp
- Revision:
- 1:c0beadca1617
- Parent:
- 0:fc0c4a184482
- Child:
- 3:a5e71bfdb492
diff -r fc0c4a184482 -r c0beadca1617 wheelchair.cpp --- a/wheelchair.cpp Thu Jul 12 18:36:09 2018 +0000 +++ b/wheelchair.cpp Thu Jul 12 19:06:33 2018 +0000 @@ -1,34 +1,41 @@ #include "wheelchair.h" -/* -Wheelchair::Wheelchair(PinName xPin, PinName yPin){ - x = new AnalogOut(xPin); - y = new AnalogOut(yPin); - } + +Wheelchair::Wheelchair(PinName xPin, PinName yPin) +{ + x = new AnalogOut(xPin); + y = new AnalogOut(yPin); +} -void Wheelchair::move(float degrees){ - } - -void Wheelchair::forward(){ +void Wheelchair::move(float degrees) +{ +} + +void Wheelchair::forward() +{ x->write(high); y->write(def); } -void Wheelchair::backward(){ +void Wheelchair::backward() +{ x->write(low); y->write(def); } -void Wheelchair::right(){ +void Wheelchair::right() +{ x->write(def); y->write(high); } -void Wheelchair::left(){ +void Wheelchair::left() +{ x->write(def); y->write(low); } -void Wheelchair::stop(){ +void Wheelchair::stop() +{ x->write(def); y->write(def); -}*/ \ No newline at end of file +} \ No newline at end of file