Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ThrottleMapper/ThrottleMapper.h
- Committer:
- bwang
- Date:
- 2017-01-25
- Revision:
- 56:c681001dfa46
- Parent:
- 50:f508c7860342
- Child:
- 73:d44bc3a46942
File content as of revision 56:c681001dfa46:
#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); }; class LimitingThrottleMapper : public ThrottleMapper { public: LimitingThrottleMapper(float wmax); virtual float map(float throttle, float w); private: float __wmax, __wlim; }; #endif