most functionality to splashdwon, find neutral and start mission. short timeouts still in code for testing, will adjust to go directly to sit_idle after splashdown
Dependencies: mbed MODSERIAL FATFileSystem
PololuHbridge/PololuHBridge.hpp@62:d502889e74f1, 2018-06-18 (annotated)
- Committer:
- tnhnrl
- Date:
- Mon Jun 18 14:45:37 2018 +0000
- Revision:
- 62:d502889e74f1
in process of making an exit command on timeout from data transmission
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tnhnrl | 62:d502889e74f1 | 1 | #ifndef POLOLUHBRIDGE_HPP |
tnhnrl | 62:d502889e74f1 | 2 | #define POLOLUHBRIDGE_HPP |
tnhnrl | 62:d502889e74f1 | 3 | |
tnhnrl | 62:d502889e74f1 | 4 | #include "mbed.h" |
tnhnrl | 62:d502889e74f1 | 5 | |
tnhnrl | 62:d502889e74f1 | 6 | class PololuHBridge |
tnhnrl | 62:d502889e74f1 | 7 | { |
tnhnrl | 62:d502889e74f1 | 8 | public: |
tnhnrl | 62:d502889e74f1 | 9 | PololuHBridge(PinName pwm, PinName dir, PinName reset); |
tnhnrl | 62:d502889e74f1 | 10 | |
tnhnrl | 62:d502889e74f1 | 11 | void run(float cmd); |
tnhnrl | 62:d502889e74f1 | 12 | void reset(); |
tnhnrl | 62:d502889e74f1 | 13 | void stop(); |
tnhnrl | 62:d502889e74f1 | 14 | |
tnhnrl | 62:d502889e74f1 | 15 | protected: |
tnhnrl | 62:d502889e74f1 | 16 | PwmOut _pwm; |
tnhnrl | 62:d502889e74f1 | 17 | DigitalOut _direction; |
tnhnrl | 62:d502889e74f1 | 18 | DigitalOut _rst; |
tnhnrl | 62:d502889e74f1 | 19 | float _p; |
tnhnrl | 62:d502889e74f1 | 20 | float _clamp(float value, float min, float max); |
tnhnrl | 62:d502889e74f1 | 21 | }; |
tnhnrl | 62:d502889e74f1 | 22 | |
tnhnrl | 62:d502889e74f1 | 23 | #endif |