blob: 7bde6ba21561527f1aa87dbb6d2ddffa885e8b20 [file] [log] [blame]
Brian Silverman41cdd3e2019-01-19 19:48:58 -08001/*----------------------------------------------------------------------------*/
2/* Copyright (c) 2008-2018 FIRST. 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 "frc/Jaguar.h"
9
10#include <hal/HAL.h>
11
12using namespace frc;
13
14Jaguar::Jaguar(int channel) : PWMSpeedController(channel) {
15 /* Input profile defined by Luminary Micro.
16 *
17 * Full reverse ranges from 0.671325ms to 0.6972211ms
18 * Proportional reverse ranges from 0.6972211ms to 1.4482078ms
19 * Neutral ranges from 1.4482078ms to 1.5517922ms
20 * Proportional forward ranges from 1.5517922ms to 2.3027789ms
21 * Full forward ranges from 2.3027789ms to 2.328675ms
22 */
23 SetBounds(2.31, 1.55, 1.507, 1.454, .697);
24 SetPeriodMultiplier(kPeriodMultiplier_1X);
25 SetSpeed(0.0);
26 SetZeroLatch();
27
28 HAL_Report(HALUsageReporting::kResourceType_Jaguar, GetChannel());
29 SetName("Jaguar", GetChannel());
30}