WPILibC++
2023.4.3
Spark.h
Go to the documentation of this file.
1
// Copyright (c) FIRST and other WPILib contributors.
2
// Open Source Software; you can modify and/or share it under the terms of
3
// the WPILib BSD license file in the root directory of this project.
4
5
#pragma once
6
7
#include "
frc/motorcontrol/PWMMotorController.h
"
8
9
namespace
frc
{
10
11
/**
12
* REV Robotics SPARK Motor %Controller.
13
*
14
* Note that the SPARK uses the following bounds for PWM values. These values
15
* should work reasonably well for most controllers, but if users experience
16
* issues such as asymmetric behavior around the deadband or inability to
17
* saturate the controller in either direction, calibration is recommended.
18
* The calibration procedure can be found in the SPARK User Manual available
19
* from REV Robotics.
20
*
21
* \li 2.003ms = full "forward"
22
* \li 1.550ms = the "high end" of the deadband range
23
* \li 1.500ms = center of the deadband range (off)
24
* \li 1.460ms = the "low end" of the deadband range
25
* \li 0.999ms = full "reverse"
26
*/
27
class
Spark
:
public
PWMMotorController
{
28
public
:
29
/**
30
* Constructor for a SPARK.
31
*
32
* @param channel The PWM channel that the SPARK is attached to. 0-9 are
33
* on-board, 10-19 are on the MXP port
34
*/
35
explicit
Spark
(
int
channel);
36
37
Spark
(
Spark
&&) =
default
;
38
Spark
&
operator=
(
Spark
&&) =
default
;
39
};
40
41
}
// namespace frc
PWMMotorController.h
frc::PWMMotorController
Common base class for all PWM Motor Controllers.
Definition:
PWMMotorController.h:26
frc::Spark
REV Robotics SPARK Motor Controller.
Definition:
Spark.h:27
frc::Spark::Spark
Spark(int channel)
Constructor for a SPARK.
frc::Spark::Spark
Spark(Spark &&)=default
frc::Spark::operator=
Spark & operator=(Spark &&)=default
frc
Definition:
AprilTagFieldLayout.h:22
frc
motorcontrol
Spark.h
Generated on Mon Mar 27 2023 03:33:16 for WPILibC++ by
1.9.4