Parker Schuh | d3b7a887 | 2018-02-19 16:42:27 -0800 | [diff] [blame] | 1 | /*----------------------------------------------------------------------------*/ |
| 2 | /* Copyright (c) FIRST 2008-2017. All Rights Reserved. */ |
| 3 | /* Open Source Software - may be modified and shared by FRC teams. The code */ |
| 4 | /* must be accompanied by the FIRST BSD license file in the root directory of */ |
| 5 | /* the project. */ |
| 6 | /*----------------------------------------------------------------------------*/ |
| 7 | |
| 8 | #pragma once |
| 9 | |
| 10 | #include <memory> |
| 11 | #include <string> |
| 12 | |
| 13 | #include "frc971/wpilib/ahal/PWM.h" |
| 14 | |
| 15 | namespace frc { |
| 16 | |
| 17 | /** |
| 18 | * Standard hobby style servo. |
| 19 | * |
| 20 | * The range parameters default to the appropriate values for the Hitec HS-322HD |
| 21 | * servo provided |
| 22 | * in the FIRST Kit of Parts in 2008. |
| 23 | */ |
| 24 | class Servo : public PWM { |
| 25 | public: |
| 26 | explicit Servo(int channel); |
| 27 | virtual ~Servo(); |
| 28 | |
| 29 | private: |
| 30 | static constexpr double kDefaultMaxServoPWM = 2.4; |
| 31 | static constexpr double kDefaultMinServoPWM = .6; |
| 32 | }; |
| 33 | |
| 34 | } // namespace frc |