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.
Control/Trim/Trim.h
- Committer:
- shimogamo
- Date:
- 2015-11-28
- Revision:
- 12:8e39bb45c61c
- Parent:
- Control/Trim.h@ 8:ca92cb674004
File content as of revision 12:8e39bb45c61c:
#ifndef BIRD_CONTROL_TRIM_H_ #define BIRD_CONTROL_TRIM_H_ #include "mbed.h" class Trim{ int _inttrim; bool upswstatus; bool downswstatus; DigitalIn _upsw; DigitalIn _downsw; Ticker ticker; void up(); void down(); void clamp(int &value, int min, int max); void clamp(double &value, double min, double max); double calc(int inttrim, double rate); void update(); public: Trim(PinName upsw, PinName downsw); double get(double rate); int getint(); }; #endif