Skip to content

Commit

Permalink
Update Phoenix diagnostics for 25.0.0-beta-4
Browse files Browse the repository at this point in the history
  • Loading branch information
jwbonner committed Dec 13, 2024
1 parent b308638 commit 57d4eda
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/hub/dataSources/PhoenixDiagnosticsSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ export default class PhoenixDiagnosticsSource extends LiveDataSource {
name = "TalonFX";
} else if (name.startsWith("Pigeon2")) {
name = "Pigeon2";
} else if (name.startsWith("CANrange")) {
name = "CANrange";
}
name = name + "-" + (device.Name.startsWith(device.Model) ? device.ID.toString() : device.Name);
if (device.CANivoreDevName.length > 0) {
Expand Down Expand Up @@ -315,7 +317,7 @@ interface Response_Point {
Signals: { [key: string]: number };
}

// Valid as of Phoenix 25.0.0-beta-1
// Valid as of Phoenix 25.0.0-beta-4
const PhoenixEnums: { [key: string]: { [key: number]: string } } = {
AppliedRotorPolarity: {
0: "PositiveIsCounterClockwise",
Expand All @@ -332,6 +334,19 @@ const PhoenixEnums: { [key: string]: { [key: number]: string } } = {
13: "BridgeReq_FaultCoast",
14: "BridgeReq_ActiveBrake"
},
ConnectedMotor: {
0: "Unknown",
1: "Falcon500_Integrated",
2: "KrakenX60_Integrated",
3: "KrakenX44_Integrated",
4: "Minion_JST",
5: "Brushed_AB",
6: "Brushed_AC",
7: "Brushed_BC",
8: "NEO_JST",
9: "NEO550_JST",
10: "VORTEX_JST"
},
ControlMode: {
0: "DisabledOutput",
1: "NeutralOut",
Expand Down Expand Up @@ -418,6 +433,11 @@ const PhoenixEnums: { [key: string]: { [key: number]: string } } = {
3: "Magnet_Green",
0: "Magnet_Invalid"
},
MeasurementHealth: {
0: "Good",
1: "Limited",
2: "Bad"
},
MotionMagicIsRunning: {
1: "Enabled",
0: "Disabled"
Expand Down

0 comments on commit 57d4eda

Please sign in to comment.