Skip to content

Commit 1da55d6

Browse files
authored
Update to REVLib 2024.2.0 kickoff release (#54)
1 parent 8c7ce1c commit 1da55d6

15 files changed

+254
-133
lines changed

gen/CANSparkBase.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
3+
classes:
4+
CANSparkBase:
5+
enums:
6+
IdleMode:
7+
InputMode:
8+
ignore: true
9+
SoftLimitDirection:
10+
FaultID:
11+
SparkModel:
12+
attributes:
13+
kFollowerDisabled:
14+
kFollowerSparkMax:
15+
kFollowerSpark:
16+
kFollowerPhoenix:
17+
methods:
18+
CANSparkMax:
19+
Set:
20+
SetVoltage:
21+
Get:
22+
SetInverted:
23+
GetInverted:
24+
Disable:
25+
StopMotor:
26+
GetEncoder:
27+
overloads:
28+
SparkRelativeEncoder::Type, int:
29+
keepalive:
30+
- [0, 1]
31+
SparkMaxRelativeEncoder::Type, int:
32+
keepalive:
33+
- [0, 1]
34+
CANEncoder::EncoderType, int:
35+
ignore: true
36+
GetAnalog:
37+
overloads:
38+
SparkAnalogSensor::Mode:
39+
keepalive:
40+
- [0, 1]
41+
SparkMaxAnalogSensor::Mode:
42+
keepalive:
43+
- [0, 1]
44+
CANAnalog::AnalogMode:
45+
ignore: true
46+
GetAbsoluteEncoder:
47+
keepalive:
48+
- [0, 1]
49+
overloads:
50+
SparkAbsoluteEncoder::Type:
51+
SparkMaxAbsoluteEncoder::Type:
52+
GetPIDController:
53+
keepalive:
54+
- [0, 1]
55+
GetForwardLimitSwitch:
56+
overloads:
57+
SparkLimitSwitch::Type:
58+
keepalive:
59+
- [0, 1]
60+
SparkMaxLimitSwitch::Type:
61+
keepalive:
62+
- [0, 1]
63+
CANDigitalInput::LimitSwitchPolarity:
64+
ignore: true
65+
GetReverseLimitSwitch:
66+
overloads:
67+
SparkLimitSwitch::Type:
68+
keepalive:
69+
- [0, 1]
70+
SparkMaxLimitSwitch::Type:
71+
keepalive:
72+
- [0, 1]
73+
CANDigitalInput::LimitSwitchPolarity:
74+
ignore: true
75+
SetSmartCurrentLimit:
76+
overloads:
77+
unsigned int:
78+
unsigned int, unsigned int, unsigned int:
79+
SetSecondaryCurrentLimit:
80+
SetIdleMode:
81+
GetIdleMode:
82+
EnableVoltageCompensation:
83+
DisableVoltageCompensation:
84+
GetVoltageCompensationNominalVoltage:
85+
SetOpenLoopRampRate:
86+
SetClosedLoopRampRate:
87+
GetOpenLoopRampRate:
88+
GetClosedLoopRampRate:
89+
Follow:
90+
overloads:
91+
const CANSparkBase&, bool:
92+
ExternalFollower, int, bool:
93+
IsFollower:
94+
GetFaults:
95+
GetStickyFaults:
96+
GetFault:
97+
GetStickyFault:
98+
GetBusVoltage:
99+
GetAppliedOutput:
100+
GetOutputCurrent:
101+
GetMotorTemperature:
102+
ClearFaults:
103+
BurnFlash:
104+
SetCANTimeout:
105+
EnableSoftLimit:
106+
IsSoftLimitEnabled:
107+
SetSoftLimit:
108+
GetSoftLimit:
109+
GetLastError:
110+
attemptToSetDataportConfigOrThrow:
111+
ignore: true
112+
CANSparkBase::ExternalFollower:
113+
attributes:
114+
arbId:
115+
configId:

gen/CANSparkFlex.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
3+
classes:
4+
CANSparkFlex:
5+
typealias:
6+
- rev::CANSparkLowLevel::MotorType
7+
methods:
8+
CANSparkFlex:
9+
GetExternalEncoder:
10+
overloads:
11+
int:
12+
keepalive:
13+
- [0, 1]
14+
SparkFlexExternalEncoder::Type, int:
15+
keepalive:
16+
- [0, 1]
17+
18+
inline_code: |
19+
cls_CANSparkFlex
20+
.def("__repr__", [](const CANSparkFlex &self) {
21+
return py::str("<CANSparkFlex {}>").format(self.GetDeviceId());
22+
});

gen/CANSparkMaxLowLevel.yml renamed to gen/CANSparkLowLevel.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22

33
classes:
4-
CANSparkMaxLowLevel:
4+
CANSparkLowLevel:
55
shared_ptr: true
66
attributes:
77
kAPIMajorVersion:
@@ -22,7 +22,7 @@ classes:
2222
PeriodicFrame:
2323
TelemetryID:
2424
methods:
25-
CANSparkMaxLowLevel:
25+
CANSparkLowLevel:
2626
GetFirmwareVersion:
2727
overloads:
2828
"":
@@ -35,6 +35,10 @@ classes:
3535
SetMotorType:
3636
GetMotorType:
3737
SetPeriodicFramePeriod:
38+
overloads:
39+
PeriodicFrame, int:
40+
CANSparkMaxLowLevel::PeriodicFrame, int:
41+
ignore: true
3842
SetControlFramePeriodMs:
3943
RestoreFactoryDefaults:
4044
EnableExternalUSBControl:
@@ -51,7 +55,7 @@ classes:
5155
SetpointCommand:
5256
ignore: true
5357
GetSafeFloat:
54-
CANSparkMaxLowLevel::PeriodicStatus0:
58+
CANSparkLowLevel::PeriodicStatus0:
5559
shared_ptr: true
5660
attributes:
5761
appliedOutput:
@@ -63,21 +67,21 @@ classes:
6367
roboRIO:
6468
isInverted:
6569
timestamp:
66-
CANSparkMaxLowLevel::PeriodicStatus1:
70+
CANSparkLowLevel::PeriodicStatus1:
6771
shared_ptr: true
6872
attributes:
6973
sensorVelocity:
7074
motorTemperature:
7175
busVoltage:
7276
outputCurrent:
7377
timestamp:
74-
CANSparkMaxLowLevel::PeriodicStatus2:
78+
CANSparkLowLevel::PeriodicStatus2:
7579
shared_ptr: true
7680
attributes:
7781
sensorPosition:
7882
iAccum:
7983
timestamp:
80-
CANSparkMaxLowLevel::TelemetryMessage:
84+
CANSparkLowLevel::TelemetryMessage:
8185
shared_ptr: true
8286
attributes:
8387
id:
@@ -87,9 +91,9 @@ classes:
8791
units:
8892
lowerBnd:
8993
upperBnd:
90-
CANSparkMaxLowLevel::FollowConfigBits:
94+
CANSparkLowLevel::FollowConfigBits:
9195
ignore: true
92-
CANSparkMaxLowLevel::FollowConfig:
96+
CANSparkLowLevel::FollowConfig:
9397
ignore: true
94-
CANSparkMaxLowLevel::FollowConfig::FollowConfigUnion:
98+
CANSparkLowLevel::FollowConfig::FollowConfigUnion:
9599
ignore: true

gen/CANSparkMax.yml

Lines changed: 3 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,12 @@
33
classes:
44
CANSparkMax:
55
typealias:
6-
- rev::CANSparkMaxLowLevel::MotorType
7-
enums:
8-
IdleMode:
9-
InputMode:
10-
ignore: true
11-
SoftLimitDirection:
12-
FaultID:
13-
attributes:
14-
kFollowerDisabled:
15-
kFollowerSparkMax:
16-
kFollowerPhoenix:
6+
- rev::CANSparkLowLevel::MotorType
177
methods:
188
CANSparkMax:
19-
Set:
20-
SetVoltage:
21-
Get:
22-
SetInverted:
23-
GetInverted:
24-
Disable:
25-
StopMotor:
26-
GetEncoder:
279
overloads:
28-
SparkMaxRelativeEncoder::Type, int:
29-
keepalive:
30-
- [0, 1]
31-
CANEncoder::EncoderType, int:
10+
int, MotorType:
11+
int, CANSparkMaxLowLevel::MotorType:
3212
ignore: true
3313
GetAlternateEncoder:
3414
overloads:
@@ -40,72 +20,6 @@ classes:
4020
- [0, 1]
4121
CANEncoder::AlternateEncoderType, int:
4222
ignore: true
43-
GetAnalog:
44-
overloads:
45-
SparkMaxAnalogSensor::Mode:
46-
keepalive:
47-
- [0, 1]
48-
CANAnalog::AnalogMode:
49-
ignore: true
50-
GetAbsoluteEncoder:
51-
keepalive:
52-
- [0, 1]
53-
GetPIDController:
54-
keepalive:
55-
- [0, 1]
56-
GetForwardLimitSwitch:
57-
overloads:
58-
SparkMaxLimitSwitch::Type:
59-
keepalive:
60-
- [0, 1]
61-
CANDigitalInput::LimitSwitchPolarity:
62-
ignore: true
63-
GetReverseLimitSwitch:
64-
overloads:
65-
SparkMaxLimitSwitch::Type:
66-
keepalive:
67-
- [0, 1]
68-
CANDigitalInput::LimitSwitchPolarity:
69-
ignore: true
70-
SetSmartCurrentLimit:
71-
overloads:
72-
unsigned int:
73-
unsigned int, unsigned int, unsigned int:
74-
SetSecondaryCurrentLimit:
75-
SetIdleMode:
76-
GetIdleMode:
77-
EnableVoltageCompensation:
78-
DisableVoltageCompensation:
79-
GetVoltageCompensationNominalVoltage:
80-
SetOpenLoopRampRate:
81-
SetClosedLoopRampRate:
82-
GetOpenLoopRampRate:
83-
GetClosedLoopRampRate:
84-
Follow:
85-
overloads:
86-
const CANSparkMax&, bool:
87-
ExternalFollower, int, bool:
88-
IsFollower:
89-
GetFaults:
90-
GetStickyFaults:
91-
GetFault:
92-
GetStickyFault:
93-
GetBusVoltage:
94-
GetAppliedOutput:
95-
GetOutputCurrent:
96-
GetMotorTemperature:
97-
ClearFaults:
98-
BurnFlash:
99-
SetCANTimeout:
100-
EnableSoftLimit:
101-
IsSoftLimitEnabled:
102-
SetSoftLimit:
103-
GetSoftLimit:
104-
GetLastError:
105-
CANSparkMax::ExternalFollower:
106-
attributes:
107-
arbId:
108-
configId:
10923

11024
inline_code: |
11125
cls_CANSparkMax

gen/SparkAbsoluteEncoder.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
3+
classes:
4+
SparkAbsoluteEncoder:
5+
enums:
6+
Type:

gen/SparkAnalogSensor.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
3+
classes:
4+
SparkAnalogSensor:
5+
enums:
6+
Mode:

gen/SparkFlexExternalEncoder.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
3+
classes:
4+
SparkFlexExternalEncoder:
5+
enums:
6+
Type:
7+
methods:
8+
GetPosition:
9+
GetVelocity:
10+
SetPosition:
11+
SetPositionConversionFactor:
12+
SetVelocityConversionFactor:
13+
GetPositionConversionFactor:
14+
GetVelocityConversionFactor:
15+
SetAverageDepth:
16+
SetMeasurementPeriod:
17+
GetAverageDepth:
18+
GetMeasurementPeriod:
19+
GetCountsPerRevolution:
20+
SetInverted:
21+
GetInverted:

gen/SparkLimitSwitch.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
3+
classes:
4+
SparkLimitSwitch:
5+
enums:
6+
Type:

gen/SparkMax.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

gen/SparkMaxPIDController.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ classes:
1111
methods:
1212
SetReference:
1313
overloads:
14+
double, CANSparkLowLevel::ControlType, int, double, SparkMaxPIDController::ArbFFUnits:
1415
double, CANSparkMaxLowLevel::ControlType, int, double, SparkMaxPIDController::ArbFFUnits:
16+
ignore: true
1517
double, ControlType, int, double, CANPIDController::ArbFFUnits:
1618
ignore: true
1719
SetP:

0 commit comments

Comments
 (0)