Dependencies: Motordriver mbed-rtos mbed
Fork of MultiModalRobot by
MultiModalRobot/MultiModalRobot.h@15:9bc36f47c8cf, 2017-11-20 (annotated)
- Committer:
- baijun
- Date:
- Mon Nov 20 03:18:42 2017 +0000
- Revision:
- 15:9bc36f47c8cf
Same thing but with our new MultiModalRobot class.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
baijun | 15:9bc36f47c8cf | 1 | #ifndef MULTIMODALROBOT_H |
baijun | 15:9bc36f47c8cf | 2 | #define MULTIMODALROBOT_H |
baijun | 15:9bc36f47c8cf | 3 | |
baijun | 15:9bc36f47c8cf | 4 | #include "motordriver.h" |
baijun | 15:9bc36f47c8cf | 5 | |
baijun | 15:9bc36f47c8cf | 6 | class MultiModalRobot { |
baijun | 15:9bc36f47c8cf | 7 | private: |
baijun | 15:9bc36f47c8cf | 8 | Motor& leftWheel; |
baijun | 15:9bc36f47c8cf | 9 | Motor& rightWheel; |
baijun | 15:9bc36f47c8cf | 10 | public: |
baijun | 15:9bc36f47c8cf | 11 | MultiModalRobot(Motor& left, Motor& right); |
baijun | 15:9bc36f47c8cf | 12 | void driveWheels(float leftSpeed, float rightSpeed); |
baijun | 15:9bc36f47c8cf | 13 | void stop(float dutyCycle); |
baijun | 15:9bc36f47c8cf | 14 | |
baijun | 15:9bc36f47c8cf | 15 | }; |
baijun | 15:9bc36f47c8cf | 16 | |
baijun | 15:9bc36f47c8cf | 17 | #endif |