2019-08-26 22:29:20 -05:00
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
|
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
#include "frc/PWMSparkMax.h"
|
|
|
|
|
|
2019-11-08 22:53:20 -08:00
|
|
|
#include <hal/FRCUsageReporting.h>
|
2019-08-26 22:29:20 -05:00
|
|
|
|
2019-09-14 15:22:54 -05:00
|
|
|
#include "frc/smartdashboard/SendableRegistry.h"
|
|
|
|
|
|
2019-08-26 22:29:20 -05:00
|
|
|
using namespace frc;
|
|
|
|
|
|
|
|
|
|
PWMSparkMax::PWMSparkMax(int channel) : PWMSpeedController(channel) {
|
2019-11-20 21:48:16 -08:00
|
|
|
SetBounds(2.003, 1.55, 1.50, 1.46, 0.999);
|
2019-08-26 22:29:20 -05:00
|
|
|
SetPeriodMultiplier(kPeriodMultiplier_1X);
|
|
|
|
|
SetSpeed(0.0);
|
|
|
|
|
SetZeroLatch();
|
|
|
|
|
|
2019-10-29 21:34:10 -07:00
|
|
|
HAL_Report(HALUsageReporting::kResourceType_RevSparkMaxPWM, GetChannel() + 1);
|
2019-09-14 15:22:54 -05:00
|
|
|
SendableRegistry::GetInstance().SetName(this, "PWMSparkMax", GetChannel());
|
2019-08-26 22:29:20 -05:00
|
|
|
}
|