Skip to content

Commit

Permalink
Update to latest Phoenix 5
Browse files Browse the repository at this point in the history
  • Loading branch information
virtuald committed Nov 11, 2023
1 parent d516cab commit 7fc1243
Show file tree
Hide file tree
Showing 19 changed files with 110 additions and 98 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ on:

jobs:
ci:
uses: robotpy/build-actions/.github/workflows/package-ci.yml@v2023
uses: robotpy/build-actions/.github/workflows/package-ci.yml@v2024
with:
enable_raspbian: false
enable_sphinx_check: false
fail_fast: false
artifactory_repo_type: vendor
python_versions: >-
["3.9", "3.10", "3.11", "3.12"]
secrets:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_PASSPHRASE: ${{ secrets.SSH_PASSPHRASE }}
META_REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
RTD_TOKEN: ${{ secrets.RTD_TOKEN }}
RTD_WEBHOOK: ${{ secrets.RTD_WEBHOOK }}
WPI_ARTIFACTORY_USERNAME: ${{ secrets.WPI_ARTIFACTORY_USERNAME }}
WPI_ARTIFACTORY_TOKEN: ${{ secrets.WPI_ARTIFACTORY_TOKEN }}
PYPI_API_TOKEN: ${{ secrets.PYPI_PASSWORD }}
1 change: 1 addition & 0 deletions ctre/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from . import _init_phoenix6
from . import _init_ctre

# autogenerated by 'robotpy-build create-imports ctre'
Expand Down
3 changes: 3 additions & 0 deletions ctre/_init_phoenix6.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from phoenix6.phoenix_native import Native

Native.instance()
3 changes: 2 additions & 1 deletion gen/BaseMotorController.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ classes:
overloads:
"":
rename: __str__
std::string&:
const std::string&:
FilterConfiguration:
shared_ptr: true
attributes:
Expand Down Expand Up @@ -322,6 +322,7 @@ classes:
GetSlotConfigs:
GetFilterConfigs:
GetHandle:
ignore: true
GetVictorSPXSimCollection:
BaseConfigAllSettings:
BaseGetAllConfigs:
Expand Down
3 changes: 1 addition & 2 deletions gen/BasePigeon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ classes:
GetCompassHeading:
GetCompassFieldStrength:
GetTemp:
overloads:
'[const]':
GetUpTime:
GetRawMagnetometer:
GetBiasedMagnetometer:
Expand All @@ -79,6 +77,7 @@ classes:
GetFirmwareVersion:
ClearStickyFaults:
GetLowLevelHandle:
ignore: true
ConfigAllSettings:
GetAllConfigs:
ConfigFactoryDefault:
Expand Down
5 changes: 3 additions & 2 deletions gen/BufferedTrajectoryPointStream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ classes:
Clear:
Write:
overloads:
TrajectoryPoint&:
TrajectoryPoint*, uint32_t:
const TrajectoryPoint&:
const TrajectoryPoint*, uint32_t:
GetHandle:
ignore: true
21 changes: 7 additions & 14 deletions gen/CANdleConfiguration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,14 @@ classes:
force_no_trampoline: true
base_qualnames:
CustomParamConfiguration: ctre::phoenix::CustomParamConfiguration
attributes:
stripType:
brightnessScalar:
disableWhenLOS:
statusLedOffWhenActive:
vBatOutputMode:
v5Enabled:
methods:
CANdleConfiguration:
toString:
rename: __str__

inline_code: |
cls_CANdleConfiguration
.def_readwrite("stripType", &ctre::phoenix::led::CANdleConfiguration::stripType,
py::doc("What type of LEDs the CANdle controls"))
.def_readwrite("brightnessScalar", &ctre::phoenix::led::CANdleConfiguration::brightnessScalar,
py::doc("Brightness scalar for all LEDs controlled"))
.def_readwrite("disableWhenLOS", &ctre::phoenix::led::CANdleConfiguration::disableWhenLOS,
py::doc("True to turn off LEDs when Loss of Signal occurrs"))
.def_readwrite("statusLedOffWhenActive", &ctre::phoenix::led::CANdleConfiguration::statusLedOffWhenActive,
py::doc("True to turn off Status LED when CANdle is actively being controlled"))
.def_readwrite("vBatOutputMode", &ctre::phoenix::led::CANdleConfiguration::vBatOutputMode,
py::doc("The behavior of VBat output"))
;
2 changes: 0 additions & 2 deletions gen/ColorFlowAnimation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
classes:
ColorFlowAnimation:
subpackage: led
typealias:
- ctre::phoenix::led::ColorFlowAnimation::Direction
enums:
Direction:
methods:
Expand Down
2 changes: 0 additions & 2 deletions gen/LarsonAnimation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
classes:
LarsonAnimation:
subpackage: led
typealias:
- ctre::phoenix::led::LarsonAnimation::BounceMode
enums:
BounceMode:
methods:
Expand Down
6 changes: 3 additions & 3 deletions gen/LimitSwitchType.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ classes:
IsRemote:
toString:
overloads:
ctre::phoenix::motorcontrol::LimitSwitchSource:
LimitSwitchSource:
ignore: true
ctre::phoenix::motorcontrol::RemoteLimitSwitchSource:
RemoteLimitSwitchSource:
ignore: true
ctre::phoenix::motorcontrol::LimitSwitchNormal:
LimitSwitchNormal:
ignore: true
12 changes: 11 additions & 1 deletion gen/Pigeon2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ classes:
force_no_trampoline: true
base_qualnames:
CustomParamConfiguration: ctre::phoenix::CustomParamConfiguration
attributes:
MountPoseYaw:
MountPosePitch:
MountPoseRoll:
EnableCompass:
DisableTemperatureCompensation:
DisableNoMotionCalibration:
XAxisGyroError:
YAxisGyroError:
ZAxisGyroError:
methods:
Pigeon2Configuration:
toString:
Expand Down Expand Up @@ -44,7 +54,7 @@ classes:
GetStickyFaults:
ConfigMountPose:
overloads:
ctre::phoenix::sensors::AxisDirection, ctre::phoenix::sensors::AxisDirection, int:
AxisDirection, AxisDirection, int:
double, double, double, int:
ConfigMountPoseYaw:
ConfigMountPosePitch:
Expand Down
6 changes: 3 additions & 3 deletions gen/PigeonIMU.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,16 @@ classes:
default: "{0,0,0}"
GetFusedHeading:
overloads:
PigeonIMU::FusionStatus&:
FusionStatus&:
"[const]":
GetResetCount:
GetResetFlags:
GetFirmVers:
HasResetOccurred:
ToString:
overloads:
ctre::phoenix::sensors::PigeonIMU::PigeonState:
ctre::phoenix::sensors::PigeonIMU::CalibrationMode:
PigeonIMU::PigeonState:
CalibrationMode:
ConfigSetCustomParam:
ConfigGetCustomParam:
ignore: true
Expand Down
2 changes: 1 addition & 1 deletion gen/StatorCurrentLimitConfiguration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ classes:
StatorCurrentLimitConfiguration:
overloads:
"":
double*, int:
const double*, int:
ignore: true # unsafe array
bool, double, double, double:
ToString:
Expand Down
2 changes: 1 addition & 1 deletion gen/SupplyCurrentLimitConfiguration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ classes:
overloads:
"":
bool, double, double, double:
double*, int:
const double*, int:
ignore: true # unsafe array
ToString:
rename: __str__
Expand Down
2 changes: 1 addition & 1 deletion gen/TalonSRX.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ classes:
TalonSRX:
overloads:
int:
int, std::string&:
int, const std::string&:
"":
ignore: true
ConfigSelectedFeedbackSensor:
Expand Down
2 changes: 0 additions & 2 deletions gen/TwinkleAnimation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
classes:
TwinkleAnimation:
subpackage: led
typealias:
- ctre::phoenix::led::TwinkleAnimation::TwinklePercent
enums:
TwinklePercent:
methods:
Expand Down
2 changes: 0 additions & 2 deletions gen/TwinkleOffAnimation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
classes:
TwinkleOffAnimation:
subpackage: led
typealias:
- ctre::phoenix::led::TwinkleOffAnimation::TwinkleOffPercent
enums:
TwinkleOffPercent:
methods:
Expand Down
2 changes: 1 addition & 1 deletion gen/VictorSPX.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ classes:
VictorSPX:
overloads:
int:
int, std::string&:
int, const std::string&:
GetPIDConfigs:
ConfigAllSettings:
GetAllConfigs:
Expand Down
Loading

0 comments on commit 7fc1243

Please sign in to comment.