blob: 487d4897bb73f6c3d3877a20b735364bfd4952a5 [file] [log] [blame]
Brian Silverman41cdd3e2019-01-19 19:48:58 -08001/*----------------------------------------------------------------------------*/
James Kuszmaul4f3ad3c2019-12-01 16:35:21 -08002/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
Brian Silverman41cdd3e2019-01-19 19:48:58 -08003/* 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
James Kuszmaul4f3ad3c2019-12-01 16:35:21 -080012#include "frc/smartdashboard/SendableRegistry.h"
13
Brian Silverman41cdd3e2019-01-19 19:48:58 -080014using namespace frc;
15
16Jaguar::Jaguar(int channel) : PWMSpeedController(channel) {
17 /* Input profile defined by Luminary Micro.
18 *
19 * Full reverse ranges from 0.671325ms to 0.6972211ms
20 * Proportional reverse ranges from 0.6972211ms to 1.4482078ms
21 * Neutral ranges from 1.4482078ms to 1.5517922ms
22 * Proportional forward ranges from 1.5517922ms to 2.3027789ms
23 * Full forward ranges from 2.3027789ms to 2.328675ms
24 */
25 SetBounds(2.31, 1.55, 1.507, 1.454, .697);
26 SetPeriodMultiplier(kPeriodMultiplier_1X);
27 SetSpeed(0.0);
28 SetZeroLatch();
29
30 HAL_Report(HALUsageReporting::kResourceType_Jaguar, GetChannel());
James Kuszmaul4f3ad3c2019-12-01 16:35:21 -080031 SendableRegistry::GetInstance().SetName(this, "Jaguar", GetChannel());
Brian Silverman41cdd3e2019-01-19 19:48:58 -080032}