From 2dd19845069dd760a2a3f3f8b76708eb620a508a Mon Sep 17 00:00:00 2001 From: Jonah <47046556+jwbonner@users.noreply.github.com> Date: Wed, 20 Dec 2023 23:11:26 -0500 Subject: [PATCH] Improve Phoenix diagnostics device naming --- src/hub/dataSources/PhoenixDiagnosticsSource.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hub/dataSources/PhoenixDiagnosticsSource.ts b/src/hub/dataSources/PhoenixDiagnosticsSource.ts index 41aece6d..c40f71ed 100644 --- a/src/hub/dataSources/PhoenixDiagnosticsSource.ts +++ b/src/hub/dataSources/PhoenixDiagnosticsSource.ts @@ -196,8 +196,12 @@ export default class PhoenixDiagnosticsSource extends LiveDataSource { /** Converts a device object to its simple name. */ private getDeviceName(device: Response_Device): string { let name = device.Model.replaceAll(" ", ""); - if (device.Model.startsWith("CANCoder")) { + if (name.startsWith("CANCoder")) { name = "CANcoder"; + } else if (name.startsWith("TalonFX")) { + name = "TalonFX"; + } else if (name.startsWith("Pigeon2")) { + name = "Pigeon2"; } name = name + "-" + (device.Name.startsWith(device.Model) ? device.ID.toString() : device.Name); if (device.CANivoreDevName.length > 0) {