Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 1 | /*----------------------------------------------------------------------------*/ |
| 2 | /* Copyright (c) 2008-2019 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/PWMTalonSRX.h" |
| 9 | |
| 10 | #include <hal/FRCUsageReporting.h> |
| 11 | |
| 12 | #include "frc/smartdashboard/SendableRegistry.h" |
| 13 | |
| 14 | using namespace frc; |
| 15 | |
| 16 | PWMTalonSRX::PWMTalonSRX(int channel) : PWMSpeedController(channel) { |
| 17 | SetBounds(2.004, 1.52, 1.50, 1.48, 0.997); |
| 18 | SetPeriodMultiplier(kPeriodMultiplier_1X); |
| 19 | SetSpeed(0.0); |
| 20 | SetZeroLatch(); |
| 21 | |
| 22 | HAL_Report(HALUsageReporting::kResourceType_PWMTalonSRX, GetChannel() + 1); |
| 23 | SendableRegistry::GetInstance().SetName(this, "PWMTalonSRX", GetChannel()); |
| 24 | } |