blob: 0cebf806e96a2fab3ae4249cf265721fdc9cb2a6 [file] [log] [blame]
Parker Schuhd3b7a8872018-02-19 16:42:27 -08001/*----------------------------------------------------------------------------*/
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#include "frc971/wpilib/ahal/Servo.h"
9
10using namespace frc;
11
12constexpr double Servo::kDefaultMaxServoPWM;
13constexpr double Servo::kDefaultMinServoPWM;
14
15/**
16 * @param channel The PWM channel to which the servo is attached. 0-9 are
17 * on-board, 10-19 are on the MXP port
18 */
19Servo::Servo(int channel) : PWM(channel) {
20 // Set minimum and maximum PWM values supported by the servo
21 SetBounds(kDefaultMaxServoPWM, 0.0, 0.0, 0.0, kDefaultMinServoPWM);
22
23 // Assign defaults for period multiplier for the servo PWM control signal
24 SetPeriodMultiplier(kPeriodMultiplier_4X);
25}
26
27Servo::~Servo() {}