001/*----------------------------------------------------------------------------*/ 002/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */ 003/* Open Source Software - may be modified and shared by FRC teams. The code */ 004/* must be accompanied by the FIRST BSD license file in the root directory of */ 005/* the project. */ 006/*----------------------------------------------------------------------------*/ 007 008package edu.wpi.first.wpilibj; 009 010import edu.wpi.first.wpilibj.hal.FRCNetComm.tResourceType; 011import edu.wpi.first.wpilibj.hal.HAL; 012 013/** 014 * Texas Instruments / Vex Robotics Jaguar Speed Controller as a PWM device. 015 */ 016public class Jaguar extends PWMSpeedController { 017 /** 018 * Constructor. 019 * 020 * @param channel The PWM channel that the Jaguar is attached to. 0-9 are on-board, 10-19 are on 021 * the MXP port 022 */ 023 public Jaguar(final int channel) { 024 super(channel); 025 026 /* 027 * Input profile defined by Luminary Micro. 028 * 029 * Full reverse ranges from 0.671325ms to 0.6972211ms Proportional reverse 030 * ranges from 0.6972211ms to 1.4482078ms Neutral ranges from 1.4482078ms to 031 * 1.5517922ms Proportional forward ranges from 1.5517922ms to 2.3027789ms 032 * Full forward ranges from 2.3027789ms to 2.328675ms 033 */ 034 setBounds(2.31, 1.55, 1.507, 1.454, .697); 035 setPeriodMultiplier(PeriodMultiplier.k1X); 036 setSpeed(0.0); 037 setZeroLatch(); 038 039 HAL.report(tResourceType.kResourceType_Jaguar, getChannel()); 040 setName("Jaguar", getChannel()); 041 } 042}