REVLib - C++
SparkParameters.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 REV Robotics
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * 1. Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * 3. Neither the name of REV Robotics nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#pragma once
30
31namespace rev::spark {
32
33enum SparkParameter : uint8_t {
34 kCanID = 0, // uint32_t
35 kInputMode = 1, // uint32_t
36 kMotorType = 2, // uint32_t
37 kCommAdvance = 3, // float
38 kSensorType = 4, // uint32_t
39 kCtrlType = 5, // uint32_t
40 kIdleMode = 6, // uint32_t
41 kInputDeadband = 7, // float
43 kClosedLoopControlSensor = 9, // uint32_t
44 kPolePairs = 10, // uint32_t
45 kCurrentChop = 11, // float
46 kCurrentChopCycles = 12, // uint32_t
47 kP_0 = 13, // float
48 kI_0 = 14, // float
49 kD_0 = 15, // float
50 kF_0 = 16, // float
51 kIZone_0 = 17, // float
52 kDFilter_0 = 18, // float
53 kOutputMin_0 = 19, // float
54 kOutputMax_0 = 20, // float
55 kP_1 = 21, // float
56 kI_1 = 22, // float
57 kD_1 = 23, // float
58 kF_1 = 24, // float
59 kIZone_1 = 25, // float
60 kDFilter_1 = 26, // float
61 kOutputMin_1 = 27, // float
62 kOutputMax_1 = 28, // float
63 kP_2 = 29, // float
64 kI_2 = 30, // float
65 kD_2 = 31, // float
66 kF_2 = 32, // float
67 kIZone_2 = 33, // float
68 kDFilter_2 = 34, // float
69 kOutputMin_2 = 35, // float
70 kOutputMax_2 = 36, // float
71 kP_3 = 37, // float
72 kI_3 = 38, // float
73 kD_3 = 39, // float
74 kF_3 = 40, // float
75 kIZone_3 = 41, // float
76 kDFilter_3 = 42, // float
77 kOutputMin_3 = 43, // float
78 kOutputMax_3 = 44, // float
79 kInverted = 45, // bool
80 kOutputRatio = 46, // float
81 kSerialNumberLow = 47, // uint32_t
82 kSerialNumberMid = 48, // uint32_t
83 kSerialNumberHigh = 49, // uint32_t
86 kHardLimitFwdEn = 52, // bool
87 kHardLimitRevEn = 53, // bool
88 kSoftLimitFwdEn = 54, // bool
89 kSoftLimitRevEn = 55, // bool
90 kRampRate = 56, // float
91 kFollowerID = 57, // uint32_t
92 kFollowerConfig = 58, // uint32_t
93 kSmartCurrentStallLimit = 59, // uint32_t
94 kSmartCurrentFreeLimit = 60, // uint32_t
95 kSmartCurrentConfig = 61, // uint32_t
96 kSmartCurrentReserved = 62, // uint32_t
97 kMotorKv = 63, // uint32_t
98 kMotorR = 64, // uint32_t
99 kMotorL = 65, // uint32_t
100 kMotorRsvd1 = 66, // uint32_t
101 kMotorRsvd2 = 67, // uint32_t
102 kMotorRsvd3 = 68, // uint32_t
103 kEncoderCountsPerRev = 69, // uint32_t
104 kEncoderAverageDepth = 70, // uint32_t
105 kEncoderSampleDelta = 71, // uint32_t
106 kEncoderInverted = 72, // bool
107 kEncoderRsvd1 = 73, // uint32_t
108 kVoltageCompMode = 74, // uint32_t
130 kIMaxAccum_0 = 96, // float
131 kSlot3Placeholder1_0 = 97, // float
132 kSlot3Placeholder2_0 = 98, // float
133 kSlot3Placeholder3_0 = 99, // float
134 kIMaxAccum_1 = 100, // float
135 kSlot3Placeholder1_1 = 101, // float
136 kSlot3Placeholder2_1 = 102, // float
137 kSlot3Placeholder3_1 = 103, // float
138 kIMaxAccum_2 = 104, // float
139 kSlot3Placeholder1_2 = 105, // float
140 kSlot3Placeholder2_2 = 106, // float
141 kSlot3Placeholder3_2 = 107, // float
142 kIMaxAccum_3 = 108, // float
143 kSlot3Placeholder1_3 = 109, // float
144 kSlot3Placeholder2_3 = 110, // float
145 kSlot3Placeholder3_3 = 111, // float
148 kClosedLoopRampRate = 114, // float
149 kSoftLimitFwd = 115, // float
150 kSoftLimitRev = 116, // float
151 kSoftLimitRsvd0 = 117, // uint32_t
152 kSoftLimitRsvd1 = 118, // uint32_t
153 kAnalogRevPerVolt = 119, // float
155 kAnalogAverageDepth = 121, // uint32_t
156 kAnalogSensorMode = 122, // uint32_t
157 kAnalogInverted = 123, // bool
158 kAnalogSampleDelta = 124, // uint32_t
159 kAnalogRsvd0 = 125, // uint32_t
160 kAnalogRsvd1 = 126, // uint32_t
161 kDataPortConfig = 127, // uint32_t
162 kAltEncoderCountsPerRev = 128, // uint32_t
163 kAltEncoderAverageDepth = 129, // uint32_t
164 kAltEncoderSampleDelta = 130, // uint32_t
165 kAltEncoderInverted = 131, // bool
168 kAltEncoderRsvd0 = 134, // uint32_t
169 kAltEncoderRsvd1 = 135, // uint32_t
170 kHallSensorSampleRate = 136, // float
171 kHallSensorAverageDepth = 137, // uint32_t
172 kNumParameters = 138, // uint32_t
175 kDutyCycleInverted = 141, // bool
176 kDutyCycleSensorMode = 142, // uint32_t
177 kDutyCycleAverageDepth = 143, // uint32_t
178 kDutyCycleSampleDelta = 144, // uint32_t
180 kDutyCycleRsvd0 = 146, // uint32_t
181 kDutyCycleRsvd1 = 147, // uint32_t
182 kDutyCycleRsvd2 = 148, // uint32_t
184 kPositionPIDMinInput = 150, // float
185 kPositionPIDMaxInput = 151, // float
187 kDutyCyclePrescaler = 153, // uint32_t
188 kDutyCycleOffset = 154, // float
189 kProductId = 155, // uint32_t
190 kDeviceMajorVersion = 156, // uint32_t
191 kDeviceMinorVersion = 157, // uint32_t
192 kStatus0Period = 158, // uint32_t
193 kStatus1Period = 159, // uint32_t
194 kStatus2Period = 160, // uint32_t
195 kStatus3Period = 161, // uint32_t
196 kStatus4Period = 162, // uint32_t
197 kStatus5Period = 163, // uint32_t
198 kStatus6Period = 164, // uint32_t
199 kStatus7Period = 165, // uint32_t
201 kMAXMotionMaxAccel_0 = 167, // float
202 kMAXMotionMaxJerk_0 = 168, // float
204 kMAXMotionPositionMode_0 = 170, // uint32_t
206 kMAXMotionMaxAccel_1 = 172, // float
207 kMAXMotionMaxJerk_1 = 173, // float
209 kMAXMotionPositionMode_1 = 175, // uint32_t
211 kMAXMotionMaxAccel_2 = 177, // float
212 kMAXMotionMaxJerk_2 = 178, // float
214 kMAXMotionPositionMode_2 = 180, // uint32_t
216 kMAXMotionMaxAccel_3 = 182, // float
217 kMAXMotionMaxJerk_3 = 183, // float
219 kMAXMotionPositionMode_3 = 185, // uint32_t
220 kForceEnableStatus0 = 186, // uint32_t
221 kForceEnableStatus1 = 187, // uint32_t
222 kForceEnableStatus2 = 188, // uint32_t
223 kForceEnableStatus3 = 189, // uint32_t
224 kForceEnableStatus4 = 190, // uint32_t
225 kForceEnableStatus5 = 191, // uint32_t
226 kForceEnableStatus6 = 192, // uint32_t
227 kForceEnableStatus7 = 193, // uint32_t
228 kFollowerModeLeaderId = 194, // uint32_t
231 kDutyCycleEncoderEndPulseUs = 197 // float
233
234} // namespace rev::spark
Definition: SparkLowLevel.cpp:40
SparkParameter
Definition: SparkParameters.h:33
@ kDutyCyclePrescaler
Definition: SparkParameters.h:187
@ kIMaxAccum_0
Definition: SparkParameters.h:130
@ kSlot3Placeholder1_0
Definition: SparkParameters.h:131
@ kSensorType
Definition: SparkParameters.h:38
@ kHallSensorSampleRate
Definition: SparkParameters.h:170
@ kMAXMotionPositionMode_0
Definition: SparkParameters.h:204
@ kOutputMin_2
Definition: SparkParameters.h:69
@ kF_1
Definition: SparkParameters.h:58
@ kClosedLoopRampRate
Definition: SparkParameters.h:148
@ kVoltageCompMode
Definition: SparkParameters.h:108
@ kSmartMotionAllowedClosedLoopError_1
Definition: SparkParameters.h:118
@ kF_2
Definition: SparkParameters.h:66
@ kFollowerModeLeaderId
Definition: SparkParameters.h:228
@ kSoftLimitRsvd1
Definition: SparkParameters.h:152
@ kOutputMin_1
Definition: SparkParameters.h:61
@ kSerialNumberHigh
Definition: SparkParameters.h:83
@ kAnalogRsvd0
Definition: SparkParameters.h:159
@ kCompensatedNominalVoltage
Definition: SparkParameters.h:109
@ kDutyCycleSampleDelta
Definition: SparkParameters.h:178
@ kMAXMotionMaxJerk_2
Definition: SparkParameters.h:212
@ kSmartCurrentConfig
Definition: SparkParameters.h:95
@ kForceEnableStatus4
Definition: SparkParameters.h:224
@ kAltEncoderCountsPerRev
Definition: SparkParameters.h:162
@ kVelocityConversionFactor
Definition: SparkParameters.h:147
@ kDutyCycleRsvd1
Definition: SparkParameters.h:181
@ kI_1
Definition: SparkParameters.h:56
@ kCommAdvance
Definition: SparkParameters.h:37
@ kIMaxAccum_3
Definition: SparkParameters.h:142
@ kP_3
Definition: SparkParameters.h:71
@ kDutyCyclePositionFactor
Definition: SparkParameters.h:173
@ kSmartCurrentStallLimit
Definition: SparkParameters.h:93
@ kI_0
Definition: SparkParameters.h:48
@ kEncoderInverted
Definition: SparkParameters.h:106
@ kMAXMotionMaxVelocity_0
Definition: SparkParameters.h:200
@ kSmartMotionMaxVelocity_2
Definition: SparkParameters.h:120
@ kDFilter_2
Definition: SparkParameters.h:68
@ kMotorRsvd1
Definition: SparkParameters.h:100
@ kSmartMotionMaxVelocity_1
Definition: SparkParameters.h:115
@ kF_3
Definition: SparkParameters.h:74
@ kForceEnableStatus5
Definition: SparkParameters.h:225
@ kDFilter_1
Definition: SparkParameters.h:60
@ kAnalogInverted
Definition: SparkParameters.h:157
@ kMAXMotionAllowedClosedLoopError_3
Definition: SparkParameters.h:218
@ kOutputMax_2
Definition: SparkParameters.h:70
@ kStatus1Period
Definition: SparkParameters.h:193
@ kInputDeadband
Definition: SparkParameters.h:41
@ kMAXMotionPositionMode_2
Definition: SparkParameters.h:214
@ kStatus2Period
Definition: SparkParameters.h:194
@ kFollowerConfig
Definition: SparkParameters.h:92
@ kHardLimitFwdEn
Definition: SparkParameters.h:86
@ kPositionPIDMaxInput
Definition: SparkParameters.h:185
@ kForceEnableStatus3
Definition: SparkParameters.h:223
@ kDutyCycleAverageDepth
Definition: SparkParameters.h:177
@ kMAXMotionMaxJerk_0
Definition: SparkParameters.h:202
@ kForceEnableStatus0
Definition: SparkParameters.h:220
@ kOutputMin_0
Definition: SparkParameters.h:53
@ kP_0
Definition: SparkParameters.h:47
@ kCurrentChopCycles
Definition: SparkParameters.h:46
@ kInverted
Definition: SparkParameters.h:79
@ kStatus4Period
Definition: SparkParameters.h:196
@ kSlot3Placeholder3_3
Definition: SparkParameters.h:145
@ kLimitSwitchFwdPolarity
Definition: SparkParameters.h:84
@ kDutyCycleOffset
Definition: SparkParameters.h:188
@ kStatus3Period
Definition: SparkParameters.h:195
@ kAltEncoderRsvd1
Definition: SparkParameters.h:169
@ kSoftLimitFwdEn
Definition: SparkParameters.h:88
@ kSoftLimitFwd
Definition: SparkParameters.h:149
@ kMAXMotionMaxJerk_1
Definition: SparkParameters.h:207
@ kMAXMotionPositionMode_3
Definition: SparkParameters.h:219
@ kSmartMotionMinVelOutput_0
Definition: SparkParameters.h:112
@ kMAXMotionMaxVelocity_3
Definition: SparkParameters.h:215
@ kI_2
Definition: SparkParameters.h:64
@ kP_2
Definition: SparkParameters.h:63
@ kSmartMotionMaxAccel_3
Definition: SparkParameters.h:126
@ kClosedLoopControlSensor
Definition: SparkParameters.h:43
@ kSerialNumberMid
Definition: SparkParameters.h:82
@ kSmartMotionAccelStrategy_0
Definition: SparkParameters.h:114
@ kMAXMotionPositionMode_1
Definition: SparkParameters.h:209
@ kSoftLimitRevEn
Definition: SparkParameters.h:89
@ kSmartMotionMinVelOutput_3
Definition: SparkParameters.h:127
@ kIZone_3
Definition: SparkParameters.h:75
@ kOutputMin_3
Definition: SparkParameters.h:77
@ kInputMode
Definition: SparkParameters.h:35
@ kMotorRsvd2
Definition: SparkParameters.h:101
@ kForceEnableStatus1
Definition: SparkParameters.h:221
@ kSoftLimitRsvd0
Definition: SparkParameters.h:151
@ kMAXMotionAllowedClosedLoopError_2
Definition: SparkParameters.h:213
@ kSlot3Placeholder3_2
Definition: SparkParameters.h:141
@ kDFilter_0
Definition: SparkParameters.h:52
@ kDeviceMajorVersion
Definition: SparkParameters.h:190
@ kOutputMax_0
Definition: SparkParameters.h:54
@ kIZone_1
Definition: SparkParameters.h:59
@ kI_3
Definition: SparkParameters.h:72
@ kP_1
Definition: SparkParameters.h:55
@ kSlot3Placeholder2_3
Definition: SparkParameters.h:144
@ kD_2
Definition: SparkParameters.h:65
@ kAnalogSensorMode
Definition: SparkParameters.h:156
@ kStatus5Period
Definition: SparkParameters.h:197
@ kDutyCycleEncoderStartPulseUs
Definition: SparkParameters.h:230
@ kLimitSwitchRevPolarity
Definition: SparkParameters.h:85
@ kSlot3Placeholder2_2
Definition: SparkParameters.h:140
@ kOutputRatio
Definition: SparkParameters.h:80
@ kSmartMotionMaxAccel_0
Definition: SparkParameters.h:111
@ kMAXMotionMaxJerk_3
Definition: SparkParameters.h:217
@ kDutyCycleRsvd0
Definition: SparkParameters.h:180
@ kPolePairs
Definition: SparkParameters.h:44
@ kDeviceMinorVersion
Definition: SparkParameters.h:191
@ kSmartMotionAllowedClosedLoopError_2
Definition: SparkParameters.h:123
@ kSlot3Placeholder1_3
Definition: SparkParameters.h:143
@ kDutyCycleInverted
Definition: SparkParameters.h:175
@ kD_0
Definition: SparkParameters.h:49
@ kHardLimitRevEn
Definition: SparkParameters.h:87
@ kAltEncoderVelocityFactor
Definition: SparkParameters.h:167
@ kDutyCycleSensorMode
Definition: SparkParameters.h:176
@ kAnalogSampleDelta
Definition: SparkParameters.h:158
@ kAnalogRevPerVolt
Definition: SparkParameters.h:153
@ kMotorR
Definition: SparkParameters.h:98
@ kMAXMotionAllowedClosedLoopError_0
Definition: SparkParameters.h:203
@ kMotorType
Definition: SparkParameters.h:36
@ kMAXMotionAllowedClosedLoopError_1
Definition: SparkParameters.h:208
@ kAltEncodePositionFactor
Definition: SparkParameters.h:166
@ kMAXMotionMaxAccel_1
Definition: SparkParameters.h:206
@ kOutputMax_3
Definition: SparkParameters.h:78
@ kSmartMotionMinVelOutput_1
Definition: SparkParameters.h:117
@ kDFilter_3
Definition: SparkParameters.h:76
@ kStatus6Period
Definition: SparkParameters.h:198
@ kIZone_2
Definition: SparkParameters.h:67
@ kIMaxAccum_1
Definition: SparkParameters.h:134
@ kCtrlType
Definition: SparkParameters.h:39
@ kD_1
Definition: SparkParameters.h:57
@ kAnalogAverageDepth
Definition: SparkParameters.h:155
@ kMotorL
Definition: SparkParameters.h:99
@ kDutyCycleOffsetv1p6p2
Definition: SparkParameters.h:179
@ kSerialNumberLow
Definition: SparkParameters.h:81
@ kMAXMotionMaxVelocity_2
Definition: SparkParameters.h:210
@ kAltEncoderSampleDelta
Definition: SparkParameters.h:164
@ kEncoderCountsPerRev
Definition: SparkParameters.h:103
@ kSmartMotionMaxAccel_1
Definition: SparkParameters.h:116
@ kFollowerModeIsInverted
Definition: SparkParameters.h:229
@ kStatus0Period
Definition: SparkParameters.h:192
@ kNumParameters
Definition: SparkParameters.h:172
@ kAltEncoderRsvd0
Definition: SparkParameters.h:168
@ kMAXMotionMaxVelocity_1
Definition: SparkParameters.h:205
@ kMotorRsvd3
Definition: SparkParameters.h:102
@ kCanID
Definition: SparkParameters.h:34
@ kSmartMotionMaxAccel_2
Definition: SparkParameters.h:121
@ kSmartMotionAccelStrategy_2
Definition: SparkParameters.h:124
@ kDutyCycleRsvd2
Definition: SparkParameters.h:182
@ kMotorKv
Definition: SparkParameters.h:97
@ kSmartMotionMaxVelocity_3
Definition: SparkParameters.h:125
@ kPositionConversionFactor
Definition: SparkParameters.h:146
@ kHallSensorAverageDepth
Definition: SparkParameters.h:171
@ kSmartMotionAccelStrategy_1
Definition: SparkParameters.h:119
@ kMAXMotionMaxAccel_0
Definition: SparkParameters.h:201
@ kIdleMode
Definition: SparkParameters.h:40
@ kEncoderRsvd1
Definition: SparkParameters.h:107
@ kD_3
Definition: SparkParameters.h:73
@ kProductId
Definition: SparkParameters.h:189
@ kStatus7Period
Definition: SparkParameters.h:199
@ kSlot3Placeholder2_1
Definition: SparkParameters.h:136
@ kSmartMotionMinVelOutput_2
Definition: SparkParameters.h:122
@ kAnalogRotationsPerVoltSec
Definition: SparkParameters.h:154
@ kCurrentChop
Definition: SparkParameters.h:45
@ kAltEncoderInverted
Definition: SparkParameters.h:165
@ kSlot3Placeholder3_0
Definition: SparkParameters.h:133
@ kLegacyFeedbackSensorPID0
Definition: SparkParameters.h:42
@ kDutyCycleVelocityFactor
Definition: SparkParameters.h:174
@ kOutputMax_1
Definition: SparkParameters.h:62
@ kDataPortConfig
Definition: SparkParameters.h:161
@ kForceEnableStatus7
Definition: SparkParameters.h:227
@ kForceEnableStatus2
Definition: SparkParameters.h:222
@ kSlot3Placeholder1_2
Definition: SparkParameters.h:139
@ kAnalogRsvd1
Definition: SparkParameters.h:160
@ kDutyCycleEncoderEndPulseUs
Definition: SparkParameters.h:231
@ kSlot3Placeholder2_0
Definition: SparkParameters.h:132
@ kSmartMotionAllowedClosedLoopError_0
Definition: SparkParameters.h:113
@ kSmartMotionAllowedClosedLoopError_3
Definition: SparkParameters.h:128
@ kForceEnableStatus6
Definition: SparkParameters.h:226
@ kDutyCycleZeroCentered
Definition: SparkParameters.h:186
@ kEncoderSampleDelta
Definition: SparkParameters.h:105
@ kSmartCurrentReserved
Definition: SparkParameters.h:96
@ kSmartCurrentFreeLimit
Definition: SparkParameters.h:94
@ kSmartMotionAccelStrategy_3
Definition: SparkParameters.h:129
@ kIZone_0
Definition: SparkParameters.h:51
@ kPositionPIDMinInput
Definition: SparkParameters.h:184
@ kPositionPIDWrapEnable
Definition: SparkParameters.h:183
@ kFollowerID
Definition: SparkParameters.h:91
@ kSoftLimitRev
Definition: SparkParameters.h:150
@ kF_0
Definition: SparkParameters.h:50
@ kMAXMotionMaxAccel_2
Definition: SparkParameters.h:211
@ kSlot3Placeholder1_1
Definition: SparkParameters.h:135
@ kSmartMotionMaxVelocity_0
Definition: SparkParameters.h:110
@ kSlot3Placeholder3_1
Definition: SparkParameters.h:137
@ kIMaxAccum_2
Definition: SparkParameters.h:138
@ kRampRate
Definition: SparkParameters.h:90
@ kAltEncoderAverageDepth
Definition: SparkParameters.h:163
@ kEncoderAverageDepth
Definition: SparkParameters.h:104
@ kMAXMotionMaxAccel_3
Definition: SparkParameters.h:216