123456789101112131415161718192021222324252627282930313233343536373839404142 |
- //
- // Created by logicp on 4/22/17.
- //
- #ifndef DRONE_THROTTLE_H
- #define DRONE_THROTTLE_H
- namespace main_stronglogic {
- class throttle {
- public:
- throttle();
- throttle(int size);
- void shut_off() {
- position = 0;
- }
- void shift(int amount);
- double flow() const {
- return position / double(top_position);
- }
- bool is_on() const {
- return (position > 0);
- }
- private:
- int top_position;
- int position;
- };
- }
- #endif //DRONE_THROTTLE_H
|