diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 3673d4f..beb210a 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -11,7 +11,7 @@ on: jobs: ci: - uses: robotpy/build-actions/.github/workflows/package-ci.yml@v2024 + uses: robotpy/build-actions/.github/workflows/package-ci.yml@v2025 with: artifactory_repo_type: vendor secrets: diff --git a/gen/AbsoluteEncoder.yml b/gen/AbsoluteEncoder.yml index 75ad5eb..93fb9f9 100644 --- a/gen/AbsoluteEncoder.yml +++ b/gen/AbsoluteEncoder.yml @@ -5,13 +5,3 @@ classes: methods: GetPosition: GetVelocity: - SetPositionConversionFactor: - GetPositionConversionFactor: - SetVelocityConversionFactor: - GetVelocityConversionFactor: - SetInverted: - GetInverted: - SetAverageDepth: - GetAverageDepth: - SetZeroOffset: - GetZeroOffset: diff --git a/gen/AbsoluteEncoderConfig.yml b/gen/AbsoluteEncoderConfig.yml new file mode 100644 index 0000000..a4bc109 --- /dev/null +++ b/gen/AbsoluteEncoderConfig.yml @@ -0,0 +1,15 @@ +--- + +classes: + AbsoluteEncoderConfig: + methods: + AbsoluteEncoderConfig: + Apply: + SetSparkMaxDataPortConfig: + Inverted: + PositionConversionFactor: + VelocityConversionFactor: + ZeroOffset: + AverageDepth: + StartPulseUs: + EndPulseUs: diff --git a/gen/AbsoluteEncoderConfigAccessor.yml b/gen/AbsoluteEncoderConfigAccessor.yml new file mode 100644 index 0000000..df0bad5 --- /dev/null +++ b/gen/AbsoluteEncoderConfigAccessor.yml @@ -0,0 +1,11 @@ +--- + +classes: + AbsoluteEncoderConfigAccessor: + methods: + GetInverted: + GetPositionConversionFactor: + GetVelocityConversionFactor: + GetAverageDepth: + GetStartPulseUs: + GetEndPulseUs: diff --git a/gen/AlternateEncoderConfig.yml b/gen/AlternateEncoderConfig.yml new file mode 100644 index 0000000..31da7b6 --- /dev/null +++ b/gen/AlternateEncoderConfig.yml @@ -0,0 +1,17 @@ +--- + +classes: + AlternateEncoderConfig: + enums: + Type: + methods: + FromId: + AlternateEncoderConfig: + Apply: + SetSparkMaxDataPortConfig: + CountsPerRevolution: + Inverted: + PositionConversionFactor: + VelocityConversionFactor: + AverageDepth: + MeasurementPeriod: diff --git a/gen/AlternateEncoderConfigAccessor.yml b/gen/AlternateEncoderConfigAccessor.yml new file mode 100644 index 0000000..d660dde --- /dev/null +++ b/gen/AlternateEncoderConfigAccessor.yml @@ -0,0 +1,10 @@ +--- + +classes: + AlternateEncoderConfigAccessor: + methods: + GetCountsPerRevolution: + GetInverted: + GetPositionConversionFactor: + GetVelocityConversionFactor: + GetMeasurementPeriod: diff --git a/gen/AnalogInput.yml b/gen/AnalogInput.yml index 3d9ea6b..89b4ceb 100644 --- a/gen/AnalogInput.yml +++ b/gen/AnalogInput.yml @@ -5,5 +5,3 @@ classes: methods: GetVoltage: GetPosition: - SetPositionConversionFactor: - GetPositionConversionFactor: diff --git a/gen/AnalogSensorConfig.yml b/gen/AnalogSensorConfig.yml new file mode 100644 index 0000000..9bad5a1 --- /dev/null +++ b/gen/AnalogSensorConfig.yml @@ -0,0 +1,10 @@ +--- + +classes: + AnalogSensorConfig: + methods: + AnalogSensorConfig: + Apply: + Inverted: + PositionConversionFactor: + VelocityConversionFactor: diff --git a/gen/AnalogSensorConfigAccessor.yml b/gen/AnalogSensorConfigAccessor.yml new file mode 100644 index 0000000..36c573a --- /dev/null +++ b/gen/AnalogSensorConfigAccessor.yml @@ -0,0 +1,8 @@ +--- + +classes: + AnalogSensorConfigAccessor: + methods: + GetInverted: + GetPositionConversionFactor: + GetVelocityConversionFactor: diff --git a/gen/BaseConfig.yml b/gen/BaseConfig.yml new file mode 100644 index 0000000..5958f5a --- /dev/null +++ b/gen/BaseConfig.yml @@ -0,0 +1,24 @@ +--- + +classes: + BaseConfig: + methods: + Flatten: + BaseConfig: + ignore: true + PutParameter: + ignore: true + GetParameter: + overloads: + uint8_t: + ignore: true + BaseConfig&, uint8_t: + ignore: true + RemoveParameter: + overloads: + uint8_t: + ignore: true + BaseConfig&, uint8_t: + ignore: true + Apply: + ignore: true diff --git a/gen/CANDeviceScanner.yml b/gen/CANDeviceScanner.yml new file mode 100644 index 0000000..4859c59 --- /dev/null +++ b/gen/CANDeviceScanner.yml @@ -0,0 +1,25 @@ +--- + +functions: + GetFRCDeviceTypeText: + GetFRCManufacturerText: +classes: + CANScanIdentifier: + attributes: + deviceTypeId: + manufacturerId: + canId: + uniqueId: + name: + methods: + CANScanIdentifier: + Name: + CANBusScanner: + methods: + CANBusScanner: + Start: + Stop: + Running: + LastError: + CANBusScan: + RegisterDevice: diff --git a/gen/CANError.yml b/gen/CANError.yml deleted file mode 100644 index e036710..0000000 --- a/gen/CANError.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -enums: - CANError: diff --git a/gen/CANSensor.yml b/gen/CANSensor.yml deleted file mode 100644 index 0efbe07..0000000 --- a/gen/CANSensor.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- - -extra_includes: -- rev/CANSparkMax.h - -classes: - CANSensor: - shared_ptr: true - attributes: - m_device: - # don't let teams shoot themselves in the foot - ignore: true - methods: - CANSensor: - ignore: true - SetInverted: - GetInverted: - GetID: diff --git a/gen/CANSparkBase.yml b/gen/CANSparkBase.yml deleted file mode 100644 index b038bbc..0000000 --- a/gen/CANSparkBase.yml +++ /dev/null @@ -1,115 +0,0 @@ ---- - -classes: - CANSparkBase: - enums: - IdleMode: - InputMode: - ignore: true - SoftLimitDirection: - FaultID: - SparkModel: - attributes: - kFollowerDisabled: - kFollowerSparkMax: - kFollowerSpark: - kFollowerPhoenix: - methods: - CANSparkMax: - Set: - SetVoltage: - Get: - SetInverted: - GetInverted: - Disable: - StopMotor: - GetEncoder: - overloads: - SparkRelativeEncoder::Type, int: - keepalive: - - [0, 1] - SparkMaxRelativeEncoder::Type, int: - keepalive: - - [0, 1] - CANEncoder::EncoderType, int: - ignore: true - GetAnalog: - overloads: - SparkAnalogSensor::Mode: - keepalive: - - [0, 1] - SparkMaxAnalogSensor::Mode: - keepalive: - - [0, 1] - CANAnalog::AnalogMode: - ignore: true - GetAbsoluteEncoder: - keepalive: - - [0, 1] - overloads: - SparkAbsoluteEncoder::Type: - SparkMaxAbsoluteEncoder::Type: - GetPIDController: - keepalive: - - [0, 1] - GetForwardLimitSwitch: - overloads: - SparkLimitSwitch::Type: - keepalive: - - [0, 1] - SparkMaxLimitSwitch::Type: - keepalive: - - [0, 1] - CANDigitalInput::LimitSwitchPolarity: - ignore: true - GetReverseLimitSwitch: - overloads: - SparkLimitSwitch::Type: - keepalive: - - [0, 1] - SparkMaxLimitSwitch::Type: - keepalive: - - [0, 1] - CANDigitalInput::LimitSwitchPolarity: - ignore: true - SetSmartCurrentLimit: - overloads: - unsigned int: - unsigned int, unsigned int, unsigned int: - SetSecondaryCurrentLimit: - SetIdleMode: - GetIdleMode: - EnableVoltageCompensation: - DisableVoltageCompensation: - GetVoltageCompensationNominalVoltage: - SetOpenLoopRampRate: - SetClosedLoopRampRate: - GetOpenLoopRampRate: - GetClosedLoopRampRate: - Follow: - overloads: - const CANSparkBase&, bool: - ExternalFollower, int, bool: - IsFollower: - GetFaults: - GetStickyFaults: - GetFault: - GetStickyFault: - GetBusVoltage: - GetAppliedOutput: - GetOutputCurrent: - GetMotorTemperature: - ClearFaults: - BurnFlash: - SetCANTimeout: - EnableSoftLimit: - IsSoftLimitEnabled: - SetSoftLimit: - GetSoftLimit: - GetLastError: - attemptToSetDataportConfigOrThrow: - ignore: true - CANSparkBase::ExternalFollower: - attributes: - arbId: - configId: diff --git a/gen/CANSparkFlex.yml b/gen/CANSparkFlex.yml deleted file mode 100644 index ba41706..0000000 --- a/gen/CANSparkFlex.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- - -classes: - CANSparkFlex: - typealias: - - rev::CANSparkLowLevel::MotorType - methods: - CANSparkFlex: - GetExternalEncoder: - overloads: - int: - keepalive: - - [0, 1] - SparkFlexExternalEncoder::Type, int: - keepalive: - - [0, 1] - -inline_code: | - cls_CANSparkFlex - .def("__repr__", [](const CANSparkFlex &self) { - return py::str("").format(self.GetDeviceId()); - }); diff --git a/gen/CANSparkLowLevel.yml b/gen/CANSparkLowLevel.yml deleted file mode 100644 index eddbbb9..0000000 --- a/gen/CANSparkLowLevel.yml +++ /dev/null @@ -1,99 +0,0 @@ ---- - -classes: - CANSparkLowLevel: - shared_ptr: true - attributes: - kAPIMajorVersion: - kAPIMinorVersion: - kAPIBuildVersion: - kAPIVersion: - # don't let people shoot themselves in the foot - m_sparkMax: - ignore: true - m_motorType: - ignore: true - m_sparkMaxHandle: - ignore: true - enums: - ControlType: - MotorType: - ParameterStatus: - PeriodicFrame: - TelemetryID: - methods: - CANSparkLowLevel: - GetFirmwareVersion: - overloads: - "": - bool&: - ignore: true - GetFirmwareString: - GetSerialNumber: - GetDeviceId: - GetInitialMotorType: - SetMotorType: - GetMotorType: - SetPeriodicFramePeriod: - overloads: - PeriodicFrame, int: - CANSparkMaxLowLevel::PeriodicFrame, int: - ignore: true - SetControlFramePeriodMs: - RestoreFactoryDefaults: - EnableExternalUSBControl: - SetEnable: - SetEncPosition: - SetIAccum: - GetPeriodicStatus0: - GetPeriodicStatus1: - GetPeriodicStatus2: - SetFollow: - ignore: true - FollowerInvert: - ignore: true - SetpointCommand: - ignore: true - GetSafeFloat: - CANSparkLowLevel::PeriodicStatus0: - shared_ptr: true - attributes: - appliedOutput: - faults: - stickyFaults: - motorType: - isFollower: - lock: - roboRIO: - isInverted: - timestamp: - CANSparkLowLevel::PeriodicStatus1: - shared_ptr: true - attributes: - sensorVelocity: - motorTemperature: - busVoltage: - outputCurrent: - timestamp: - CANSparkLowLevel::PeriodicStatus2: - shared_ptr: true - attributes: - sensorPosition: - iAccum: - timestamp: - CANSparkLowLevel::TelemetryMessage: - shared_ptr: true - attributes: - id: - value: - timestamp: - name: - units: - lowerBnd: - upperBnd: - CANSparkLowLevel::FollowConfigBits: - ignore: true - CANSparkLowLevel::FollowConfig: - ignore: true - CANSparkLowLevel::FollowConfig::FollowConfigUnion: - ignore: true diff --git a/gen/CANSparkMax.yml b/gen/CANSparkMax.yml deleted file mode 100644 index 4ab134c..0000000 --- a/gen/CANSparkMax.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- - -classes: - CANSparkMax: - typealias: - - rev::CANSparkLowLevel::MotorType - methods: - CANSparkMax: - overloads: - int, MotorType: - int, CANSparkMaxLowLevel::MotorType: - ignore: true - GetAlternateEncoder: - overloads: - int: - keepalive: - - [0, 1] - SparkMaxAlternateEncoder::Type, int: - keepalive: - - [0, 1] - CANEncoder::AlternateEncoderType, int: - ignore: true - -inline_code: | - cls_CANSparkMax - .def("__repr__", [](const CANSparkMax &self) { - return py::str("").format(self.GetDeviceId()); - }); diff --git a/gen/ClosedLoopConfig.yml b/gen/ClosedLoopConfig.yml new file mode 100644 index 0000000..06f8359 --- /dev/null +++ b/gen/ClosedLoopConfig.yml @@ -0,0 +1,34 @@ +--- + +classes: + ClosedLoopConfig: + attributes: + maxMotion: + smartMotion: + enums: + FeedbackSensor: + methods: + ClosedLoopConfig: + Apply: + overloads: + ClosedLoopConfig&: + SmartMotionConfig&: + MAXMotionConfig&: + Pidf: + Pid: + P: + I: + D: + VelocityFF: + DFilter: + IZone: + MinOutput: + MaxOutput: + OutputRange: + IMaxAccum: + PositionWrappingEnabled: + PositionWrappingMinInput: + PositionWrappingMaxInput: + PositionWrappingInputRange: + SetFeedbackSensor: + Flatten: diff --git a/gen/ClosedLoopConfigAccessor.yml b/gen/ClosedLoopConfigAccessor.yml new file mode 100644 index 0000000..48068b9 --- /dev/null +++ b/gen/ClosedLoopConfigAccessor.yml @@ -0,0 +1,21 @@ +--- + +classes: + ClosedLoopConfigAccessor: + attributes: + maxMotion: + smartMotion: + methods: + GetP: + GetI: + GetD: + GetFF: + GetDFilter: + GetIZone: + GetMinOutput: + GetMaxOutput: + GetMaxIAccumulation: + GetPositionWrappingEnabled: + GetPositionWrappingMinInput: + GetPositionWrappingMaxInput: + GetFeedbackSensor: diff --git a/gen/ClosedLoopSlot.yml b/gen/ClosedLoopSlot.yml new file mode 100644 index 0000000..bbf7b70 --- /dev/null +++ b/gen/ClosedLoopSlot.yml @@ -0,0 +1,4 @@ +--- + +enums: + ClosedLoopSlot: diff --git a/gen/ControlType.yml b/gen/ControlType.yml deleted file mode 100644 index 1ee521e..0000000 --- a/gen/ControlType.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -enums: - ControlType: diff --git a/gen/EncoderConfig.yml b/gen/EncoderConfig.yml new file mode 100644 index 0000000..157fafc --- /dev/null +++ b/gen/EncoderConfig.yml @@ -0,0 +1,15 @@ +--- + +classes: + EncoderConfig: + methods: + EncoderConfig: + Apply: + CountsPerRevolution: + Inverted: + PositionConversionFactor: + VelocityConversionFactor: + QuadratureAverageDepth: + QuadratureMeasurementPeriod: + UvwAverageDepth: + UvwMeasurementPeriod: diff --git a/gen/EncoderConfigAccessor.yml b/gen/EncoderConfigAccessor.yml new file mode 100644 index 0000000..fa722fd --- /dev/null +++ b/gen/EncoderConfigAccessor.yml @@ -0,0 +1,13 @@ +--- + +classes: + EncoderConfigAccessor: + methods: + GetCountsPerRevolution: + GetInverted: + GetPositionConversionFactor: + GetVelocityConversionFactor: + GetQuadratureAverageDepth: + GetQuadratureMeasurementPeriod: + GetUvwAverageDepth: + GetUvwMeasurementPeriod: diff --git a/gen/ExternalEncoderConfig.yml b/gen/ExternalEncoderConfig.yml new file mode 100644 index 0000000..619f39c --- /dev/null +++ b/gen/ExternalEncoderConfig.yml @@ -0,0 +1,16 @@ +--- + +classes: + ExternalEncoderConfig: + enums: + Type: + methods: + FromId: + ExternalEncoderConfig: + Apply: + CountsPerRevolution: + Inverted: + PositionConversionFactor: + VelocityConversionFactor: + AverageDepth: + MeasurementPeriod: diff --git a/gen/ExternalEncoderConfigAccessor.yml b/gen/ExternalEncoderConfigAccessor.yml new file mode 100644 index 0000000..c66c045 --- /dev/null +++ b/gen/ExternalEncoderConfigAccessor.yml @@ -0,0 +1,11 @@ +--- + +classes: + ExternalEncoderConfigAccessor: + methods: + GetCountsPerRevolution: + GetInverted: + GetPositionConversionFactor: + GetVelocityConversionFactor: + GetAverageDepth: + GetMeasurementPeriod: diff --git a/gen/LimitSwitchConfig.yml b/gen/LimitSwitchConfig.yml new file mode 100644 index 0000000..d0c2237 --- /dev/null +++ b/gen/LimitSwitchConfig.yml @@ -0,0 +1,14 @@ +--- + +classes: + LimitSwitchConfig: + enums: + Type: + methods: + LimitSwitchConfig: + Apply: + SetSparkMaxDataPortConfig: + ForwardLimitSwitchEnabled: + ForwardLimitSwitchType: + ReverseLimitSwitchEnabled: + ReverseLimitSwitchType: diff --git a/gen/LimitSwitchConfigAccessor.yml b/gen/LimitSwitchConfigAccessor.yml new file mode 100644 index 0000000..285f0f2 --- /dev/null +++ b/gen/LimitSwitchConfigAccessor.yml @@ -0,0 +1,9 @@ +--- + +classes: + LimitSwitchConfigAccessor: + methods: + GetForwardLimitSwitchEnabled: + GetForwardSwitchType: + GetReverseLimitSwitchEnabled: + GetReverseSwitchType: diff --git a/gen/MAXMotionConfig.yml b/gen/MAXMotionConfig.yml new file mode 100644 index 0000000..fdb1fc4 --- /dev/null +++ b/gen/MAXMotionConfig.yml @@ -0,0 +1,13 @@ +--- + +classes: + MAXMotionConfig: + enums: + MAXMotionPositionMode: + methods: + MAXMotionConfig: + Apply: + MaxVelocity: + MaxAcceleration: + AllowedClosedLoopError: + PositionMode: diff --git a/gen/MAXMotionConfigAccessor.yml b/gen/MAXMotionConfigAccessor.yml new file mode 100644 index 0000000..dbc1616 --- /dev/null +++ b/gen/MAXMotionConfigAccessor.yml @@ -0,0 +1,9 @@ +--- + +classes: + MAXMotionConfigAccessor: + methods: + GetMaxVelocity: + GetMaxAcceleration: + GetAllowedClosedLoopError: + GetPositionMode: diff --git a/gen/MotorFeedbackSensor.yml b/gen/MotorFeedbackSensor.yml deleted file mode 100644 index 5933210..0000000 --- a/gen/MotorFeedbackSensor.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- - -classes: - MotorFeedbackSensor: - methods: - SetInverted: - GetInverted: - trampoline_inline_code: | - int GetSparkMaxFeedbackDeviceID() const override { - throw py::type_error("not implemented"); - } \ No newline at end of file diff --git a/gen/MovingAverageFilterSim.yml b/gen/MovingAverageFilterSim.yml new file mode 100644 index 0000000..9aec38c --- /dev/null +++ b/gen/MovingAverageFilterSim.yml @@ -0,0 +1,8 @@ +--- + +classes: + MovingAverageFilterSim: + methods: + MovingAverageFilterSim: + put: + get: diff --git a/gen/NoiseGenerator.yml b/gen/NoiseGenerator.yml new file mode 100644 index 0000000..a2605b9 --- /dev/null +++ b/gen/NoiseGenerator.yml @@ -0,0 +1,7 @@ +--- + +classes: + NoiseGenerator: + methods: + whiteNoise: + hallSensorVelocity: diff --git a/gen/RelativeEncoder.yml b/gen/RelativeEncoder.yml index 440dd87..d1ec149 100644 --- a/gen/RelativeEncoder.yml +++ b/gen/RelativeEncoder.yml @@ -1,23 +1,11 @@ --- +extra_includes_first: +- rev/REVLibError.h + classes: RelativeEncoder: methods: GetPosition: GetVelocity: SetPosition: - SetPositionConversionFactor: - SetVelocityConversionFactor: - GetPositionConversionFactor: - GetVelocityConversionFactor: - SetAverageDepth: - SetMeasurementPeriod: - GetAverageDepth: - GetMeasurementPeriod: - GetCountsPerRevolution: - SetInverted: - GetInverted: - trampoline_inline_code: | - int GetSparkMaxFeedbackDeviceID() const override { - throw py::type_error("not implemented"); - } \ No newline at end of file diff --git a/gen/SignalsConfig.yml b/gen/SignalsConfig.yml new file mode 100644 index 0000000..4006e3e --- /dev/null +++ b/gen/SignalsConfig.yml @@ -0,0 +1,41 @@ +--- + +classes: + SignalsConfig: + methods: + SignalsConfig: + Apply: + AppliedOutputPeriodMs: + AppliedOutputAlwaysOn: + BusVoltagePeriodMs: + BusVoltageAlwaysOn: + OutputCurrentPeriodMs: + OutputCurrentAlwaysOn: + MotorTemperaturePeriodMs: + MotorTemperatureAlwaysOn: + LimitsPeriodMs: + LimitsAlwaysOn: + FaultsPeriodMs: + FaultsAlwaysOn: + WarningsPeriodMs: + WarningsAlwaysOn: + PrimaryEncoderVelocityPeriodMs: + PrimaryEncoderVelocityAlwaysOn: + PrimaryEncoderPositionPeriodMs: + PrimaryEncoderPositionAlwaysOn: + AnalogVoltagePeriodMs: + AnalogVoltageAlwaysOn: + AnalogVelocityPeriodMs: + AnalogVelocityAlwaysOn: + AnalogPositionPeriodMs: + AnalogPositionAlwaysOn: + ExternalOrAltEncoderVelocity: + ExternalOrAltEncoderVelocityAlwaysOn: + ExternalOrAltEncoderPosition: + ExternalOrAltEncoderPositionAlwaysOn: + AbsoluteEncoderVelocityPeriodMs: + AbsoluteEncoderVelocityAlwaysOn: + AbsoluteEncoderPositionPeriodMs: + AbsoluteEncoderPositionAlwaysOn: + IAccumulationPeriodMs: + IAccumulationAlwaysOn: diff --git a/gen/SignalsConfigAccessor.yml b/gen/SignalsConfigAccessor.yml new file mode 100644 index 0000000..3d73820 --- /dev/null +++ b/gen/SignalsConfigAccessor.yml @@ -0,0 +1,39 @@ +--- + +classes: + SignalsConfigAccessor: + methods: + GetAppliedOutputPeriodMs: + GetAppliedOutputAlwaysOn: + GetBusVoltagePeriodMs: + GetBusVoltageAlwaysOn: + GetOutputCurrentPeriodMs: + GetOutputCurrentAlwaysOn: + GetMotorTemperaturePeriodMs: + GetMotorTemperatureAlwaysOn: + GetLimitsPeriodMs: + GetLimitsAlwaysOn: + GetFaultsPeriodMs: + GetFaultsAlwaysOn: + GetWarningsPeriodMs: + GetWarningsAlwaysOn: + GetPrimaryEncoderVelocityPeriodMs: + GetPrimaryEncoderVelocityAlwaysOn: + GetPrimaryEncoderPositionPeriodMs: + GetPrimaryEncoderPositionAlwaysOn: + GetAnalogVoltagePeriodMs: + GetAnalogVoltageAlwaysOn: + GetAnalogVelocityPeriodMs: + GetAnalogVelocityAlwaysOn: + GetAnalogPositionPeriodMs: + GetAnalogPositionAlwaysOn: + GetExternalOrAltEncoderVelocityPeriodMs: + GetExternalOrAltEncoderVelocityAlwaysOn: + GetExternalOrAltEncoderPositionPeriodMs: + GetExternalOrAltEncoderPositionAlwaysOn: + GetAbsoluteEncoderVelocityPeriodMs: + GetAbsoluteEncoderVelocityAlwaysOn: + GetAbsoluteEncoderPositionPeriodMs: + GetAbsoluteEncoderPositionAlwaysOn: + GetIAccumulationPeriodMs: + GetIAccumulationAlwaysOn: diff --git a/gen/SmartMotionConfig.yml b/gen/SmartMotionConfig.yml new file mode 100644 index 0000000..b83494d --- /dev/null +++ b/gen/SmartMotionConfig.yml @@ -0,0 +1,11 @@ +--- + +classes: + SmartMotionConfig: + methods: + SmartMotionConfig: + Apply: + MaxVelocity: + MaxAcceleration: + MinOutputVelocity: + AllowedClosedLoopError: diff --git a/gen/SmartMotionConfigAccessor.yml b/gen/SmartMotionConfigAccessor.yml new file mode 100644 index 0000000..d2ba6a1 --- /dev/null +++ b/gen/SmartMotionConfigAccessor.yml @@ -0,0 +1,9 @@ +--- + +classes: + SmartMotionConfigAccessor: + methods: + GetMaxVelocity: + GetMaxAcceleration: + GetMinOutputVelocity: + GetAllowedClosedLoopError: diff --git a/gen/SoftLimitConfig.yml b/gen/SoftLimitConfig.yml new file mode 100644 index 0000000..895e900 --- /dev/null +++ b/gen/SoftLimitConfig.yml @@ -0,0 +1,11 @@ +--- + +classes: + SoftLimitConfig: + methods: + SoftLimitConfig: + Apply: + ForwardSoftLimit: + ForwardSoftLimitEnabled: + ReverseSoftLimit: + ReverseSoftLimitEnabled: diff --git a/gen/SoftLimitConfigAccessor.yml b/gen/SoftLimitConfigAccessor.yml new file mode 100644 index 0000000..11d7b22 --- /dev/null +++ b/gen/SoftLimitConfigAccessor.yml @@ -0,0 +1,9 @@ +--- + +classes: + SoftLimitConfigAccessor: + methods: + GetForwardSoftLimitEnabled: + GetForwardSoftLimit: + GetReverseSoftLimitEnabled: + GetReverseSoftLimit: diff --git a/gen/SparkAbsoluteEncoder.yml b/gen/SparkAbsoluteEncoder.yml index 79f75bc..8274c4a 100644 --- a/gen/SparkAbsoluteEncoder.yml +++ b/gen/SparkAbsoluteEncoder.yml @@ -2,5 +2,8 @@ classes: SparkAbsoluteEncoder: - enums: - Type: + base_qualnames: + AbsoluteEncoder: rev::AbsoluteEncoder + methods: + GetPosition: + GetVelocity: diff --git a/gen/CANEncoder.yml b/gen/SparkAbsoluteEncoderSim.yml similarity index 56% rename from gen/CANEncoder.yml rename to gen/SparkAbsoluteEncoderSim.yml index f434c91..3aeb935 100644 --- a/gen/CANEncoder.yml +++ b/gen/SparkAbsoluteEncoderSim.yml @@ -1,22 +1,22 @@ --- classes: - CANEncoder: - enums: - EncoderType: - AlternateEncoderType: + SparkAbsoluteEncoderSim: methods: + SparkAbsoluteEncoderSim: + overloads: + SparkMax*: + SparkFlex*: + SetPosition: GetPosition: + SetVelocity: GetVelocity: - SetPosition: + SetInverted: + GetInverted: + SetZeroOffset: + GetZeroOffset: SetPositionConversionFactor: - SetVelocityConversionFactor: GetPositionConversionFactor: + SetVelocityConversionFactor: GetVelocityConversionFactor: - SetAverageDepth: - SetMeasurementPeriod: - GetAverageDepth: - GetMeasurementPeriod: - GetCountsPerRevolution: - SetInverted: - GetInverted: + iterate: diff --git a/gen/SparkAnalogSensor.yml b/gen/SparkAnalogSensor.yml index 28c1d08..3db85b9 100644 --- a/gen/SparkAnalogSensor.yml +++ b/gen/SparkAnalogSensor.yml @@ -2,5 +2,9 @@ classes: SparkAnalogSensor: - enums: - Mode: + base_qualnames: + AnalogInput: rev::AnalogInput + methods: + GetVoltage: + GetPosition: + GetVelocity: diff --git a/gen/SparkMaxRelativeEncoder.yml b/gen/SparkAnalogSensorSim.yml similarity index 58% rename from gen/SparkMaxRelativeEncoder.yml rename to gen/SparkAnalogSensorSim.yml index 77cb5af..9772035 100644 --- a/gen/SparkMaxRelativeEncoder.yml +++ b/gen/SparkAnalogSensorSim.yml @@ -1,21 +1,22 @@ --- classes: - SparkMaxRelativeEncoder: - enums: - Type: + SparkAnalogSensorSim: methods: + SparkAnalogSensorSim: + overloads: + SparkMax*: + SparkFlex*: + SetVoltage: + GetVoltage: + SetPosition: GetPosition: + SetVelocity: GetVelocity: - SetPosition: + SetInverted: + GetInverted: SetPositionConversionFactor: - SetVelocityConversionFactor: GetPositionConversionFactor: + SetVelocityConversionFactor: GetVelocityConversionFactor: - SetAverageDepth: - SetMeasurementPeriod: - GetAverageDepth: - GetMeasurementPeriod: - GetCountsPerRevolution: - SetInverted: - GetInverted: + iterate: diff --git a/gen/SparkBase.yml b/gen/SparkBase.yml new file mode 100644 index 0000000..cdf1b34 --- /dev/null +++ b/gen/SparkBase.yml @@ -0,0 +1,94 @@ +--- + +extra_includes: +- rev/SparkLowLevel.h +- rev/config/SparkBaseConfig.h + +classes: + SparkBase: + typealias: + - rev::spark::SparkLowLevel::MotorType + - rev::spark::SparkLowLevel::SparkModel + attributes: + m_setpoint: + enums: + IdleMode: + SoftLimitDirection: + ResetMode: + PersistMode: + methods: + Set: + SetVoltage: + Get: + SetInverted: + GetInverted: + Disable: + StopMotor: + Configure: + GetEncoder: + return_value_policy: reference_internal + GetAnalog: + return_value_policy: reference_internal + GetAbsoluteEncoder: + return_value_policy: reference_internal + GetClosedLoopController: + return_value_policy: reference_internal + GetForwardLimitSwitch: + return_value_policy: reference_internal + GetReverseLimitSwitch: + return_value_policy: reference_internal + ResumeFollowerMode: + PauseFollowerMode: + IsFollower: + HasActiveFault: + HasStickyFault: + HasActiveWarning: + HasStickyWarning: + GetFaults: + GetStickyFaults: + GetWarnings: + GetStickyWarnings: + GetBusVoltage: + GetAppliedOutput: + GetOutputCurrent: + GetMotorTemperature: + ClearFaults: + SetCANTimeout: + GetLastError: + PreGetAbsoluteEncoder: + PreGetForwardLimitSwitch: + PreGetReverseLimitSwitch: + SparkBase: + GetEncoderEvenIfAlreadyCreated: + GetMotorInterface: + GetSparkModel: + SparkBase::Faults: + attributes: + other: + motorType: + sensor: + can: + temperature: + gateDriver: + escEeprom: + firmware: + methods: + Faults: + overloads: + "": + uint16_t: + SparkBase::Warnings: + attributes: + brownout: + overcurrent: + escEeprom: + extEeprom: + sensor: + stall: + hasReset: + other: + methods: + Warnings: + overloads: + "": + uint16_t: diff --git a/gen/SparkBaseConfig.yml b/gen/SparkBaseConfig.yml new file mode 100644 index 0000000..8c6d25f --- /dev/null +++ b/gen/SparkBaseConfig.yml @@ -0,0 +1,40 @@ +--- + +classes: + SparkBaseConfig: + attributes: + absoluteEncoder: + analogSensor: + closedLoop: + encoder: + limitSwitch: + signals: + softLimit: + enums: + IdleMode: + methods: + SparkBaseConfig: + Apply: + overloads: + SparkBaseConfig&: + AbsoluteEncoderConfig&: + AnalogSensorConfig&: + EncoderConfig&: + LimitSwitchConfig&: + SoftLimitConfig&: + ClosedLoopConfig&: + SignalsConfig&: + SetIdleMode: + Inverted: + SmartCurrentLimit: + SecondaryCurrentLimit: + OpenLoopRampRate: + ClosedLoopRampRate: + VoltageCompensation: + DisableVoltageCompensation: + Follow: + overloads: + int, bool: + SparkBase&, bool: + DisableFollowerMode: + Flatten: diff --git a/gen/SparkBaseConfigAccessor.yml b/gen/SparkBaseConfigAccessor.yml new file mode 100644 index 0000000..f557a86 --- /dev/null +++ b/gen/SparkBaseConfigAccessor.yml @@ -0,0 +1,26 @@ +--- + +classes: + SparkBaseConfigAccessor: + attributes: + absoluteEncoder: + analogSensor: + closedLoop: + encoder: + limitSwitch: + signals: + softLimit: + methods: + GetIdleMode: + GetInverted: + GetSmartCurrentLimit: + GetSmartCurrentFreeLimit: + GetSmartCurrentRPMLimit: + GetSecondaryCurrentLimit: + GetSecondaryCurrentLimitChopCycles: + GetOpenLoopRampRate: + GetClosedLoopRampRate: + GetVoltageCompensation: + GetVoltageCompensationEnabled: + GetFollowerModeLeaderId: + GetFollowerModeInverted: diff --git a/gen/SparkClosedLoopController.yml b/gen/SparkClosedLoopController.yml new file mode 100644 index 0000000..51c082b --- /dev/null +++ b/gen/SparkClosedLoopController.yml @@ -0,0 +1,10 @@ +--- + +classes: + SparkClosedLoopController: + enums: + ArbFFUnits: + methods: + SetReference: + SetIAccum: + GetIAccum: diff --git a/gen/SparkMaxAbsoluteEncoder.yml b/gen/SparkExternalEncoderSim.yml similarity index 71% rename from gen/SparkMaxAbsoluteEncoder.yml rename to gen/SparkExternalEncoderSim.yml index 9f0b440..e5a1df3 100644 --- a/gen/SparkMaxAbsoluteEncoder.yml +++ b/gen/SparkExternalEncoderSim.yml @@ -1,19 +1,19 @@ --- classes: - SparkMaxAbsoluteEncoder: - enums: - Type: + SparkExternalEncoderSim: methods: + SparkExternalEncoderSim: + SetPosition: GetPosition: + SetVelocity: GetVelocity: - SetPositionConversionFactor: - GetPositionConversionFactor: - SetVelocityConversionFactor: - GetVelocityConversionFactor: SetInverted: GetInverted: - SetAverageDepth: - GetAverageDepth: SetZeroOffset: GetZeroOffset: + SetPositionConversionFactor: + GetPositionConversionFactor: + SetVelocityConversionFactor: + GetVelocityConversionFactor: + iterate: diff --git a/gen/SparkFlex.yml b/gen/SparkFlex.yml new file mode 100644 index 0000000..6580571 --- /dev/null +++ b/gen/SparkFlex.yml @@ -0,0 +1,15 @@ +--- + +extra_includes: +- rev/SparkLowLevel.h + +classes: + SparkFlex: + typealias: + - rev::spark::SparkLowLevel::MotorType + attributes: + configAccessor: + methods: + SparkFlex: + GetExternalEncoder: + return_value_policy: reference_internal diff --git a/gen/SparkFlexConfig.yml b/gen/SparkFlexConfig.yml new file mode 100644 index 0000000..e7b0a5e --- /dev/null +++ b/gen/SparkFlexConfig.yml @@ -0,0 +1,13 @@ +--- + +classes: + SparkFlexConfig: + attributes: + externalEncoder: + methods: + SparkFlexConfig: + Apply: + overloads: + SparkFlexConfig&: + ExternalEncoderConfig&: + Flatten: diff --git a/gen/SparkFlexConfigAccessor.yml b/gen/SparkFlexConfigAccessor.yml new file mode 100644 index 0000000..fe997ba --- /dev/null +++ b/gen/SparkFlexConfigAccessor.yml @@ -0,0 +1,7 @@ +--- + +classes: + SparkFlexConfigAccessor: + is_polymorphic: false + attributes: + externalEncoder: diff --git a/gen/SparkFlexExternalEncoder.yml b/gen/SparkFlexExternalEncoder.yml index cda211d..b180d70 100644 --- a/gen/SparkFlexExternalEncoder.yml +++ b/gen/SparkFlexExternalEncoder.yml @@ -2,20 +2,9 @@ classes: SparkFlexExternalEncoder: - enums: - Type: + base_qualnames: + RelativeEncoder: rev::RelativeEncoder methods: GetPosition: GetVelocity: SetPosition: - SetPositionConversionFactor: - SetVelocityConversionFactor: - GetPositionConversionFactor: - GetVelocityConversionFactor: - SetAverageDepth: - SetMeasurementPeriod: - GetAverageDepth: - GetMeasurementPeriod: - GetCountsPerRevolution: - SetInverted: - GetInverted: diff --git a/gen/SparkFlexSim.yml b/gen/SparkFlexSim.yml new file mode 100644 index 0000000..b985fa6 --- /dev/null +++ b/gen/SparkFlexSim.yml @@ -0,0 +1,9 @@ +--- + +classes: + SparkFlexSim: + is_polymorphic: false + methods: + SparkFlexSim: + GetExternalEncoderSim: + return_value_policy: reference_internal diff --git a/gen/SparkLimitSwitch.yml b/gen/SparkLimitSwitch.yml index 04d3f09..70b4fb0 100644 --- a/gen/SparkLimitSwitch.yml +++ b/gen/SparkLimitSwitch.yml @@ -2,5 +2,5 @@ classes: SparkLimitSwitch: - enums: - Type: + methods: + Get: diff --git a/gen/SparkLimitSwitchSim.yml b/gen/SparkLimitSwitchSim.yml new file mode 100644 index 0000000..50949af --- /dev/null +++ b/gen/SparkLimitSwitchSim.yml @@ -0,0 +1,12 @@ +--- + +classes: + SparkLimitSwitchSim: + methods: + SparkLimitSwitchSim: + overloads: + SparkMax*, bool: + SparkFlex*, bool: + SetPressed: + GetPressed: + GetEnabled: diff --git a/gen/SparkLowLevel.yml b/gen/SparkLowLevel.yml new file mode 100644 index 0000000..e641ea9 --- /dev/null +++ b/gen/SparkLowLevel.yml @@ -0,0 +1,126 @@ +--- + +extra_includes_first: +- rev/REVLibError.h + +classes: + SparkLowLevel: + typealias: + - rev::REVLibError + attributes: + kAPIMajorVersion: + kAPIMinorVersion: + kAPIBuildVersion: + kAPIVersion: + m_motorType: + m_expectedSparkModel: + m_sparkMaxHandle: + enums: + MotorType: + ControlType: + ParameterStatus: + PeriodicFrame: + SparkModel: + methods: + GetFirmwareVersion: + overloads: + "": + bool&: + GetFirmwareString: + GetSerialNumber: + GetDeviceId: + GetMotorType: + SetPeriodicFrameTimeout: + SetCANMaxRetries: + SetControlFramePeriodMs: + CreateSimFaultManager: + GetPeriodicStatus0: + GetPeriodicStatus1: + GetPeriodicStatus2: + GetPeriodicStatus3: + GetPeriodicStatus4: + GetPeriodicStatus5: + GetPeriodicStatus6: + GetPeriodicStatus7: + SetpointCommand: + GetSafeFloat: + SparkLowLevel::PeriodicStatus0: + attributes: + appliedOutput: + voltage: + current: + motorTemperature: + hardForwardLimitReached: + hardReverseLimitReached: + softForwardLimitReached: + softReverseLimitReached: + inverted: + primaryHeartbeatLock: + timestamp: + SparkLowLevel::PeriodicStatus1: + attributes: + otherFault: + motorTypeFault: + sensorFault: + canFault: + temperatureFault: + drvFault: + escEepromFault: + firmwareFault: + brownoutWarning: + overcurrentWarning: + escEepromWarning: + extEepromWarning: + sensorWarning: + stallWarning: + hasResetWarning: + otherWarning: + otherStickyFault: + motorTypeStickyFault: + sensorStickyFault: + canStickyFault: + temperatureStickyFault: + drvStickyFault: + escEepromStickyFault: + firmwareStickyFault: + brownoutStickyWarning: + overcurrentStickyWarning: + escEepromStickyWarning: + extEepromStickyWarning: + sensorStickyWarning: + stallStickyWarning: + hasResetStickyWarning: + otherStickyWarning: + isFollower: + timestamp: + SparkLowLevel::PeriodicStatus2: + attributes: + primaryEncoderVelocity: + primaryEncoderPosition: + timestamp: + SparkLowLevel::PeriodicStatus3: + attributes: + analogVoltage: + analogVelocity: + analogPosition: + timestamp: + SparkLowLevel::PeriodicStatus4: + attributes: + externalOrAltEncoderVelocity: + externalOrAltEncoderPosition: + timestamp: + SparkLowLevel::PeriodicStatus5: + attributes: + dutyCycleEncoderVelocity: + dutyCycleEncoderPosition: + timestamp: + SparkLowLevel::PeriodicStatus6: + attributes: + unadjustedDutyCycle: + dutyCyclePeriod: + dutyCycleNoSignal: + timestamp: + SparkLowLevel::PeriodicStatus7: + attributes: + iAccumulation: + timestamp: diff --git a/gen/SparkMax.yml b/gen/SparkMax.yml new file mode 100644 index 0000000..488826e --- /dev/null +++ b/gen/SparkMax.yml @@ -0,0 +1,18 @@ +--- + +extra_includes_first: +- rev/SparkLowLevel.h + +classes: + SparkMax: + typealias: + - rev::spark::SparkLowLevel::MotorType + attributes: + configAccessor: + methods: + SparkMax: + GetAlternateEncoder: + return_value_policy: reference_internal + PreGetAbsoluteEncoder: + PreGetForwardLimitSwitch: + PreGetReverseLimitSwitch: diff --git a/gen/SparkMaxAlternateEncoder.yml b/gen/SparkMaxAlternateEncoder.yml index 72a13ae..16e5823 100644 --- a/gen/SparkMaxAlternateEncoder.yml +++ b/gen/SparkMaxAlternateEncoder.yml @@ -2,20 +2,9 @@ classes: SparkMaxAlternateEncoder: - enums: - Type: + base_qualnames: + RelativeEncoder: rev::RelativeEncoder methods: GetPosition: GetVelocity: SetPosition: - SetPositionConversionFactor: - SetVelocityConversionFactor: - GetPositionConversionFactor: - GetVelocityConversionFactor: - SetAverageDepth: - SetMeasurementPeriod: - GetAverageDepth: - GetMeasurementPeriod: - GetCountsPerRevolution: - SetInverted: - GetInverted: diff --git a/gen/CANAnalog.yml b/gen/SparkMaxAlternateEncoderSim.yml similarity index 60% rename from gen/CANAnalog.yml rename to gen/SparkMaxAlternateEncoderSim.yml index aeb872e..300903a 100644 --- a/gen/CANAnalog.yml +++ b/gen/SparkMaxAlternateEncoderSim.yml @@ -1,20 +1,19 @@ --- classes: - CANAnalog: - enums: - AnalogMode: + SparkMaxAlternateEncoderSim: methods: - GetVoltage: + SparkMaxAlternateEncoderSim: + SetPosition: GetPosition: + SetVelocity: GetVelocity: + SetInverted: + GetInverted: + SetZeroOffset: + GetZeroOffset: SetPositionConversionFactor: GetPositionConversionFactor: SetVelocityConversionFactor: GetVelocityConversionFactor: - SetAverageDepth: - SetMeasurementPeriod: - GetAverageDepth: - GetMeasurementPeriod: - SetInverted: - GetInverted: + iterate: diff --git a/gen/SparkMaxConfig.yml b/gen/SparkMaxConfig.yml new file mode 100644 index 0000000..9ecd1b5 --- /dev/null +++ b/gen/SparkMaxConfig.yml @@ -0,0 +1,15 @@ +--- + +classes: + SparkMaxConfig: + attributes: + alternateEncoder: + enums: + DataPortConfig: + methods: + SparkMaxConfig: + Apply: + overloads: + SparkMaxConfig&: + AlternateEncoderConfig&: + Flatten: diff --git a/gen/SparkMaxConfigAccessor.yml b/gen/SparkMaxConfigAccessor.yml new file mode 100644 index 0000000..f8c5387 --- /dev/null +++ b/gen/SparkMaxConfigAccessor.yml @@ -0,0 +1,7 @@ +--- + +classes: + SparkMaxConfigAccessor: + is_polymorphic: false + attributes: + alternateEncoder: diff --git a/gen/SparkMaxLimitSwitch.yml b/gen/SparkMaxLimitSwitch.yml deleted file mode 100644 index 5a1040f..0000000 --- a/gen/SparkMaxLimitSwitch.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- - -classes: - SparkMaxLimitSwitch: - ignored_bases: - - CANDigitalInput - enums: - Type: - methods: - Get: - EnableLimitSwitch: - IsLimitSwitchEnabled: diff --git a/gen/SparkMaxPIDController.yml b/gen/SparkMaxPIDController.yml deleted file mode 100644 index 7ad4478..0000000 --- a/gen/SparkMaxPIDController.yml +++ /dev/null @@ -1,74 +0,0 @@ ---- - -extra_includes: -- rev/CANSparkMax.h - -classes: - SparkMaxPIDController: - enums: - AccelStrategy: - ArbFFUnits: - methods: - SetReference: - overloads: - double, CANSparkLowLevel::ControlType, int, double, SparkMaxPIDController::ArbFFUnits: - double, CANSparkMaxLowLevel::ControlType, int, double, SparkMaxPIDController::ArbFFUnits: - ignore: true - double, ControlType, int, double, CANPIDController::ArbFFUnits: - ignore: true - SetP: - SetI: - SetD: - SetDFilter: - SetFF: - SetIZone: - doc: | - Set the IZone range of the PIDF controller on the SPARK MAX. This value - specifies the range the :math:`|error|` must be within for the integral constant - to take effect. - - This uses the Set Parameter API and should be used infrequently. - The parameter does not presist unless :meth:`.burnFlash` is called. - The recommended method to configure this parameter is to use the - SPARK MAX GUI to tune and save parameters. - - :param IZone: The IZone value, must be positive. Set to 0 to disable - :param slotID: Is the gain schedule slot, the value is a number - between 0 and 3. Each slot has its own set of gain values and - can be changed in each control frame using :meth:`setReference`. - - :returns: REVLibError.kOk if successful - SetOutputRange: - GetP: - GetI: - GetD: - GetDFilter: - GetFF: - GetIZone: - GetOutputMin: - GetOutputMax: - SetSmartMotionMaxVelocity: - SetSmartMotionMaxAccel: - SetSmartMotionMinOutputVelocity: - SetSmartMotionAllowedClosedLoopError: - SetSmartMotionAccelStrategy: - overloads: - SparkMaxPIDController::AccelStrategy, int: - CANPIDController::AccelStrategy, int: - ignore: true - GetSmartMotionMaxVelocity: - GetSmartMotionMaxAccel: - GetSmartMotionMinOutputVelocity: - GetSmartMotionAllowedClosedLoopError: - GetSmartMotionAccelStrategy: - SetIMaxAccum: - GetIMaxAccum: - SetIAccum: - GetIAccum: - SetFeedbackDevice: - SetPositionPIDWrappingEnabled: - SetPositionPIDWrappingMaxInput: - SetPositionPIDWrappingMinInput: - GetPositionPIDWrappingEnabled: - GetPositionPIDWrappingMaxInput: - GetPositionPIDWrappingMinInput: diff --git a/gen/SparkMaxSim.yml b/gen/SparkMaxSim.yml new file mode 100644 index 0000000..e130157 --- /dev/null +++ b/gen/SparkMaxSim.yml @@ -0,0 +1,9 @@ +--- + +classes: + SparkMaxSim: + is_polymorphic: false + methods: + SparkMaxSim: + GetAlternateEncoderSim: + return_value_policy: reference_internal diff --git a/gen/SparkPIDController.yml b/gen/SparkPIDController.yml deleted file mode 100644 index 1b1692a..0000000 --- a/gen/SparkPIDController.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- - -classes: - SparkPIDController: - enums: - AccelStrategy: - ArbFFUnits: diff --git a/gen/SparkParameters.yml b/gen/SparkParameters.yml new file mode 100644 index 0000000..3be3e13 --- /dev/null +++ b/gen/SparkParameters.yml @@ -0,0 +1,4 @@ +--- + +enums: + SparkParameter: diff --git a/gen/SparkRelativeEncoder.yml b/gen/SparkRelativeEncoder.yml index ed5f9fd..9e97062 100644 --- a/gen/SparkRelativeEncoder.yml +++ b/gen/SparkRelativeEncoder.yml @@ -2,5 +2,9 @@ classes: SparkRelativeEncoder: - enums: - Type: + base_qualnames: + RelativeEncoder: rev::RelativeEncoder + methods: + GetPosition: + GetVelocity: + SetPosition: diff --git a/gen/SparkMaxAnalogSensor.yml b/gen/SparkRelativeEncoderSim.yml similarity index 53% rename from gen/SparkMaxAnalogSensor.yml rename to gen/SparkRelativeEncoderSim.yml index 01a43d1..7d789ff 100644 --- a/gen/SparkMaxAnalogSensor.yml +++ b/gen/SparkRelativeEncoderSim.yml @@ -1,20 +1,22 @@ --- classes: - SparkMaxAnalogSensor: - enums: - Mode: + SparkRelativeEncoderSim: methods: - GetVoltage: + SparkRelativeEncoderSim: + overloads: + SparkMax*: + SparkFlex*: + SetPosition: GetPosition: + SetVelocity: GetVelocity: + SetInverted: + GetInverted: + SetZeroOffset: + GetZeroOffset: SetPositionConversionFactor: GetPositionConversionFactor: SetVelocityConversionFactor: GetVelocityConversionFactor: - SetAverageDepth: - SetMeasurementPeriod: - GetAverageDepth: - GetMeasurementPeriod: - SetInverted: - GetInverted: + iterate: diff --git a/gen/SparkSim.yml b/gen/SparkSim.yml new file mode 100644 index 0000000..07647c8 --- /dev/null +++ b/gen/SparkSim.yml @@ -0,0 +1,34 @@ +--- + +classes: + SparkSim: + methods: + SparkSim: + GetAppliedOutput: + SetAppliedOutput: + GetSetpoint: + GetClosedLoopSlot: + iterate: + GetVelocity: + SetVelocity: + GetPosition: + SetPosition: + GetBusVoltage: + SetBusVoltage: + GetMotorCurrent: + SetMotorCurrent: + enable: + disable: + useDriverStationEnable: + GetRelativeEncoderSim: + return_value_policy: reference_internal + GetAbsoluteEncoderSim: + return_value_policy: reference_internal + GetAnalogSensorSim: + return_value_policy: reference_internal + GetForwardLimitSwitchSim: + return_value_policy: reference_internal + GetReverseLimitSwitchSim: + return_value_policy: reference_internal + GetFaultManager: + return_value_policy: reference_internal diff --git a/gen/SparkSimFaultManager.yml b/gen/SparkSimFaultManager.yml new file mode 100644 index 0000000..2d967ac --- /dev/null +++ b/gen/SparkSimFaultManager.yml @@ -0,0 +1,13 @@ +--- + +classes: + SparkSimFaultManager: + methods: + SparkSimFaultManager: + overloads: + SparkMax*: + SparkFlex*: + SetFaults: + SetStickyFaults: + SetWarnings: + SetStickyWarnings: diff --git a/gen/driver/CANSparkMaxFrames.yml b/gen/driver/CANSparkMaxFrames.yml deleted file mode 100644 index 50c101f..0000000 --- a/gen/driver/CANSparkMaxFrames.yml +++ /dev/null @@ -1,142 +0,0 @@ ---- - -attributes: - CMD_API_SETPNT_SET: - ignore: true - CMD_API_DC_SET: - ignore: true - CMD_API_SPD_SET: - ignore: true - CMD_API_SMART_VEL_SET: - ignore: true - CMD_API_POS_SET: - ignore: true - CMD_API_VOLT_SET: - ignore: true - CMD_API_CURRENT_SET: - ignore: true - CMD_API_SMARTMOTION_SET: - ignore: true - CMD_API_STAT0: - ignore: true - CMD_API_STAT1: - ignore: true - CMD_API_STAT2: - ignore: true - CMD_API_STAT3: - ignore: true - CMD_API_STAT4: - ignore: true - CMD_API_CLEAR_FAULTS: - ignore: true - CMD_API_DRV_STAT: - ignore: true - CMD_API_BURN_FLASH: - ignore: true - CMD_API_SET_FOLLOWER: - ignore: true - CMD_API_FACTORY_DEFAULT: - ignore: true - CMD_API_FACTORY_RESET: - ignore: true - CMD_API_IDENTIFY: - ignore: true - CMD_API_NACK: - ignore: true - CMD_API_ACK: - ignore: true - CMD_API_BROADCAST: - ignore: true - CMD_API_HEARTBEAT: - ignore: true - CMD_API_SYNC: - ignore: true - CMD_API_ID_QUERY: - ignore: true - CMD_API_ID_ASSIGN: - ignore: true - CMD_API_FIRMWARE: - ignore: true - CMD_API_ENUM: - ignore: true - CMD_API_LOCK: - ignore: true - CMD_API_LOCKB: - ignore: true - CMD_API_NONRIO_HB: - ignore: true - CMD_API_SWDL_BOOTLOADER: - ignore: true - CMD_API_SWDL_DATA: - ignore: true - CMD_API_SWDL_CHKSUM: - ignore: true - CMD_API_SWDL_RETRANSMIT: - ignore: true - CMD_API_MECH_POS: - ignore: true - CMD_API_I_ACCUM: - ignore: true - CMD_API_ANALOG_POS: - ignore: true - CMD_API_ALT_ENC_POS: - ignore: true - CMD_API_PARAM_ACCESS: - ignore: true - EXT_ID_API_STAT0: - ignore: true - EXT_ID_API_STAT1: - ignore: true - EXT_ID_API_STAT2: - ignore: true - EXT_ID_API_STAT3: - ignore: true - EXT_ID_API_STAT4: - ignore: true -enums: - frc_deviceType_t: - frc_manufacturer_t: -functions: - GetFRCDeviceTypeText: - GetFRCManufacturerText: - GetTelemetryDataName: - GetTelemetryDataUnits: - GetTelemetryDataUpperBound: - GetTelemetryDataLowerBound: -classes: - frc_dataframe_setpoint_out_t: - ignore: true - frc_dataframe_statusConfig_out_t: - ignore: true - frc_dataframe_setParam_out_t: - ignore: true - frc_dataframe_getParam_in_t: - ignore: true - frc_dataframe_burnFlash_out_t: - ignore: true - frc_dataframe_follower_out_t: - ignore: true - frc_dataframe_firmware_in_t: - ignore: true - frc_dataframe_status0_in_t: - ignore: true - frc_dataframe_status1_in_t: - ignore: true - frc_dataframe_status2_in_t: - ignore: true - frc_dataframe_status3_in_t: - ignore: true - frc_dataframe_status4_in_t: - ignore: true - frc_dataframe_userStatus_in_t: - ignore: true - frc_dataframe_drvStatus_in_t: - ignore: true - frc_dataframe_t: - ignore: true - frc_frameIDFields_t: - ignore: true - frc_frameID_t: - ignore: true - frc_frame_t: - ignore: true diff --git a/pyproject.toml b/pyproject.toml index 62347d1..3de5ab8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,17 +6,13 @@ author_email = "robotpy@googlegroups.com" url = "https://github.com/robotpy/robotpy-rev" license = "BSD-3-Clause" install_requires = [ - "robotpy-wpiutil<2025.0.0,>=2024.3.2", - "robotpy-wpimath<2025.0.0,>=2024.3.2", - "wpilib<2025.0.0,>=2024.3.2", + "wpilib~=2025.0.0b1", ] [build-system] requires = [ - "robotpy-build<2025.0.0,~=2024.0.0", - "robotpy-wpiutil<2025.0.0,~=2024.3.2", - "robotpy-wpimath<2025.0.0,~=2024.3.2", - "wpilib<2025.0.0,~=2024.3.2", + "robotpy-build<2025.0.0b1,~=2025.0.0a1", + "wpilib~=2025.0.0b1", ] [tool.robotpy-build] @@ -26,14 +22,14 @@ base_package = "rev" artifact_id = "REVLib-driver" group_id = "com.revrobotics.frc" repo_url = "https://maven.revrobotics.com" -version = "2024.2.4" +version = "2025.0.0-beta-1" libs = ["REVLibDriver"] [tool.robotpy-build.static_libs."revlib".maven_lib_download] artifact_id = "REVLib-cpp" group_id = "com.revrobotics.frc" repo_url = "https://maven.revrobotics.com" -version = "2024.2.4" +version = "2025.0.0-beta-1" libs = ["REVLib"] [tool.robotpy-build.wrappers."rev"] @@ -55,36 +51,93 @@ depends = [ generation_data = "gen" [tool.robotpy-build.wrappers."rev".autogen_headers] +# rev +# CANSparkDriver = "rev/CANSparkDriver.h" +# CANSparkDriverPrivate = "rev/CANSparkDriverPrivate.h" +# CANSparkFrames = "rev/CANSparkFrames.h" +# CANSparkMaxFrames = "rev/CANSparkMaxFrames.h" +# CANSparkParameters = "rev/CANSparkParameters.h" +# CANSparkSWDL = "rev/CANSparkSWDL.h" +# REVCommon = "rev/REVCommon.h" +# REVLibDaemon = "rev/REVLibDaemon.h" +# REVLibErrors = "rev/REVLibErrors.h" +# REVUtils = "rev/REVUtils.h" +# SparkFrameManager = "rev/SparkFrameManager.h" + +# rev/rev +# REVLibVersion = "rev/rev/REVLibVersion.h" + +# rev/sim +# CANSpark = "rev/sim/CANSpark.h" +# MAXMotion = "rev/sim/MAXMotion.h" +# SmartCurrentLimit = "rev/sim/SmartCurrentLimit.h" + # rev AbsoluteEncoder = "rev/AbsoluteEncoder.h" AnalogInput = "rev/AnalogInput.h" -CANAnalog = "rev/CANAnalog.h" +# TODO: uncomment when GetFRCDeviceTypeText and GetFRCManufacturerText are +# marked as `static inline` # CANDeviceScanner = "rev/CANDeviceScanner.h" -# CANDigitalInput = "rev/CANDigitalInput.h" -CANEncoder = "rev/CANEncoder.h" -# CANPIDController = "rev/CANPIDController.h" -CANSensor = "rev/CANSensor.h" -CANSparkBase = "rev/CANSparkBase.h" -CANSparkFlex = "rev/CANSparkFlex.h" -CANSparkLowLevel = "rev/CANSparkLowLevel.h" -CANSparkMax = "rev/CANSparkMax.h" -# CANSparkMaxLowLevel = "rev/CANSparkMaxLowLevel.h" CIEColor = "rev/CIEColor.h" ColorMatch = "rev/ColorMatch.h" ColorSensorV3 = "rev/ColorSensorV3.h" -# ControlType = "rev/ControlType.h" -MotorFeedbackSensor = "rev/MotorFeedbackSensor.h" REVLibError = "rev/REVLibError.h" RelativeEncoder = "rev/RelativeEncoder.h" SparkAbsoluteEncoder = "rev/SparkAbsoluteEncoder.h" SparkAnalogSensor = "rev/SparkAnalogSensor.h" +SparkBase = "rev/SparkBase.h" +SparkClosedLoopController = "rev/SparkClosedLoopController.h" +SparkFlex = "rev/SparkFlex.h" SparkFlexExternalEncoder = "rev/SparkFlexExternalEncoder.h" SparkLimitSwitch = "rev/SparkLimitSwitch.h" -SparkMaxAbsoluteEncoder = "rev/SparkMaxAbsoluteEncoder.h" +SparkLowLevel = "rev/SparkLowLevel.h" +SparkMax = "rev/SparkMax.h" SparkMaxAlternateEncoder = "rev/SparkMaxAlternateEncoder.h" -SparkMaxAnalogSensor = "rev/SparkMaxAnalogSensor.h" -SparkMaxLimitSwitch = "rev/SparkMaxLimitSwitch.h" -SparkMaxPIDController = "rev/SparkMaxPIDController.h" -SparkMaxRelativeEncoder = "rev/SparkMaxRelativeEncoder.h" -SparkPIDController = "rev/SparkPIDController.h" SparkRelativeEncoder = "rev/SparkRelativeEncoder.h" +SparkSim = "rev/SparkSim.h" + +# rev/config +AbsoluteEncoderConfig = "rev/config/AbsoluteEncoderConfig.h" +AbsoluteEncoderConfigAccessor = "rev/config/AbsoluteEncoderConfigAccessor.h" +AlternateEncoderConfig = "rev/config/AlternateEncoderConfig.h" +AlternateEncoderConfigAccessor = "rev/config/AlternateEncoderConfigAccessor.h" +AnalogSensorConfig = "rev/config/AnalogSensorConfig.h" +AnalogSensorConfigAccessor = "rev/config/AnalogSensorConfigAccessor.h" +BaseConfig = "rev/config/BaseConfig.h" +ClosedLoopConfig = "rev/config/ClosedLoopConfig.h" +ClosedLoopConfigAccessor = "rev/config/ClosedLoopConfigAccessor.h" +ClosedLoopSlot = "rev/config/ClosedLoopSlot.h" +EncoderConfig = "rev/config/EncoderConfig.h" +EncoderConfigAccessor = "rev/config/EncoderConfigAccessor.h" +ExternalEncoderConfig = "rev/config/ExternalEncoderConfig.h" +ExternalEncoderConfigAccessor = "rev/config/ExternalEncoderConfigAccessor.h" +LimitSwitchConfig = "rev/config/LimitSwitchConfig.h" +LimitSwitchConfigAccessor = "rev/config/LimitSwitchConfigAccessor.h" +MAXMotionConfig = "rev/config/MAXMotionConfig.h" +MAXMotionConfigAccessor = "rev/config/MAXMotionConfigAccessor.h" +SignalsConfig = "rev/config/SignalsConfig.h" +SignalsConfigAccessor = "rev/config/SignalsConfigAccessor.h" +SmartMotionConfig = "rev/config/SmartMotionConfig.h" +SmartMotionConfigAccessor = "rev/config/SmartMotionConfigAccessor.h" +SoftLimitConfig = "rev/config/SoftLimitConfig.h" +SoftLimitConfigAccessor = "rev/config/SoftLimitConfigAccessor.h" +SparkBaseConfig = "rev/config/SparkBaseConfig.h" +SparkBaseConfigAccessor = "rev/config/SparkBaseConfigAccessor.h" +SparkFlexConfig = "rev/config/SparkFlexConfig.h" +SparkFlexConfigAccessor = "rev/config/SparkFlexConfigAccessor.h" +SparkMaxConfig = "rev/config/SparkMaxConfig.h" +SparkMaxConfigAccessor = "rev/config/SparkMaxConfigAccessor.h" +SparkParameters = "rev/config/SparkParameters.h" + +# rev/sim +MovingAverageFilterSim = "rev/sim/MovingAverageFilterSim.h" +NoiseGenerator = "rev/sim/NoiseGenerator.h" +SparkAbsoluteEncoderSim = "rev/sim/SparkAbsoluteEncoderSim.h" +SparkAnalogSensorSim = "rev/sim/SparkAnalogSensorSim.h" +SparkExternalEncoderSim = "rev/sim/SparkExternalEncoderSim.h" +SparkFlexSim = "rev/sim/SparkFlexSim.h" +SparkLimitSwitchSim = "rev/sim/SparkLimitSwitchSim.h" +SparkMaxAlternateEncoderSim = "rev/sim/SparkMaxAlternateEncoderSim.h" +SparkMaxSim = "rev/sim/SparkMaxSim.h" +SparkRelativeEncoderSim = "rev/sim/SparkRelativeEncoderSim.h" +SparkSimFaultManager = "rev/sim/SparkSimFaultManager.h"