From 57d4eda0298a795ba6658591ba84d6fcc721a3ae Mon Sep 17 00:00:00 2001 From: Jonah <47046556+jwbonner@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:19:16 -0500 Subject: [PATCH] Update Phoenix diagnostics for 25.0.0-beta-4 --- .../dataSources/PhoenixDiagnosticsSource.ts | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/hub/dataSources/PhoenixDiagnosticsSource.ts b/src/hub/dataSources/PhoenixDiagnosticsSource.ts index 12b4b96f..85d9575f 100644 --- a/src/hub/dataSources/PhoenixDiagnosticsSource.ts +++ b/src/hub/dataSources/PhoenixDiagnosticsSource.ts @@ -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) { @@ -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", @@ -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", @@ -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"