Bayley Wang
/
foc-ed_in_the_bot_compact
robot
Diff: ThrottleMapper/ThrottleMapper.h
- Revision:
- 42:030e0ec4eac5
- Child:
- 50:f508c7860342
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ThrottleMapper/ThrottleMapper.h Fri Jan 06 07:54:22 2017 +0000 @@ -0,0 +1,22 @@ +#ifndef __THROTTLE_MAPPER_H +#define __THROTTLE_MAPPER_H + +class ThrottleMapper { +public: + virtual float map(float throttle, float w) = 0; +}; + +class NullThrottleMapper : public ThrottleMapper { +public: + virtual float map(float throttle, float w) {return throttle;} +}; + +class DrivingThrottleMapper : public ThrottleMapper{ +public: + virtual float map(float throttle, float w); +private: + float getMaxTqpctPlus(float w); + float getMaxTqpctMinus(float w); + float getZeroTqThrottle(float w); +}; +#endif \ No newline at end of file