mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Remove underscores from HardwareModels enum
This commit is contained in:
parent
c0586f71e3
commit
b492989658
2 changed files with 89 additions and 85 deletions
|
|
@ -10,27 +10,27 @@ import Foundation
|
|||
enum HardwareModels: String, CaseIterable, Identifiable {
|
||||
|
||||
case UNSET
|
||||
case TLORA_V2
|
||||
case TLORA_V1
|
||||
case TLORA_V2_1_1P6
|
||||
case TLORAV2
|
||||
case TLORAV1
|
||||
case TLORAV211P6
|
||||
case TBEAM
|
||||
case HELTEC_V2_0
|
||||
case TBEAM_V0P7
|
||||
case T_ECHO
|
||||
case TLORA_V1_1P3
|
||||
case HELTECV20
|
||||
case TBEAMV0P7
|
||||
case TECHO
|
||||
case TLORAV11P3
|
||||
case RAK4631
|
||||
case HELTEC_V2_1
|
||||
case HELTEC_V1
|
||||
case LILYGO_TBEAM_S3_CORE
|
||||
case HELTECV21
|
||||
case HELTECV1
|
||||
case LILYGOTBEAMS3CORE
|
||||
case RAK11200
|
||||
case NANO_G1
|
||||
case TLORA_V2_1_1P8
|
||||
case TLORA_T3_S3
|
||||
case NANO_G1_EXPLORER
|
||||
case STATION_G1
|
||||
case NANOG1
|
||||
case TLORAV211P8
|
||||
case TLORAT3S3
|
||||
case NANOG1EXPLORER
|
||||
case STATIONG1
|
||||
case M5STACK
|
||||
case HELTEC_V3
|
||||
case HELTEC_WSL_V3
|
||||
case HELTECV3
|
||||
case HELTECWSLV3
|
||||
|
||||
var id: String { self.rawValue }
|
||||
var description: String {
|
||||
|
|
@ -38,47 +38,47 @@ enum HardwareModels: String, CaseIterable, Identifiable {
|
|||
|
||||
case .UNSET:
|
||||
return NSLocalizedString("unset", comment: "UNSET")
|
||||
case .TLORA_V2:
|
||||
case .TLORAV2:
|
||||
return "TLoRa V2"
|
||||
case .TLORA_V1:
|
||||
case .TLORAV1:
|
||||
return "TLoRa V1"
|
||||
case .TLORA_V2_1_1P6:
|
||||
case .TLORAV211P6:
|
||||
return "TLoRa V2.1.1.6"
|
||||
case .TBEAM:
|
||||
return "TBeam"
|
||||
case .HELTEC_V2_0:
|
||||
case .HELTECV20:
|
||||
return "HELTEC V2.0"
|
||||
case .TBEAM_V0P7:
|
||||
case .TBEAMV0P7:
|
||||
return "TBeam 0.7"
|
||||
case .T_ECHO:
|
||||
case .TECHO:
|
||||
return "TEcho"
|
||||
case .TLORA_V1_1P3:
|
||||
case .TLORAV11P3:
|
||||
return "TLORA V1.1.3"
|
||||
case .RAK4631:
|
||||
return "RAK 4631 NRF"
|
||||
case .HELTEC_V2_1:
|
||||
case .HELTECV21:
|
||||
return "HELTEC V2.1"
|
||||
case .HELTEC_V1:
|
||||
case .HELTECV1:
|
||||
return "HELTEC V1"
|
||||
case .LILYGO_TBEAM_S3_CORE:
|
||||
case .LILYGOTBEAMS3CORE:
|
||||
return "TBEAM S3"
|
||||
case .RAK11200:
|
||||
return "RAK 11200 ESP32"
|
||||
case .NANO_G1:
|
||||
case .NANOG1:
|
||||
return "Nano G1"
|
||||
case .TLORA_V2_1_1P8:
|
||||
case .TLORAV211P8:
|
||||
return "TLoRa V2.1.1.8"
|
||||
case .TLORA_T3_S3:
|
||||
case .TLORAT3S3:
|
||||
return "TLoRa T3 S3"
|
||||
case .NANO_G1_EXPLORER:
|
||||
case .NANOG1EXPLORER:
|
||||
return "Nano G1 Explorer"
|
||||
case .STATION_G1:
|
||||
case .STATIONG1:
|
||||
return "Station G1"
|
||||
case .M5STACK:
|
||||
return "M5 Stack"
|
||||
case .HELTEC_V3:
|
||||
case .HELTECV3:
|
||||
return "Heltec V3"
|
||||
case .HELTEC_WSL_V3:
|
||||
case .HELTECWSLV3:
|
||||
return "Heltec wireless stick lite V3"
|
||||
}
|
||||
|
||||
|
|
@ -88,47 +88,47 @@ enum HardwareModels: String, CaseIterable, Identifiable {
|
|||
|
||||
case .UNSET:
|
||||
return []
|
||||
case .TLORA_V2:
|
||||
case .TLORAV2:
|
||||
return ["firmware-tlora-v2-"]
|
||||
case .TLORA_V1:
|
||||
case .TLORAV1:
|
||||
return ["firmware-tlora-v1-"]
|
||||
case .TLORA_V2_1_1P6:
|
||||
case .TLORAV211P6:
|
||||
return ["firmware-tlora-v2-1-1.6-"]
|
||||
case .TBEAM:
|
||||
return ["firmware-tbeam-"]
|
||||
case .HELTEC_V2_0:
|
||||
case .HELTECV20:
|
||||
return ["firmware-heltec-v2.0-"]
|
||||
case .TBEAM_V0P7:
|
||||
case .TBEAMV0P7:
|
||||
return ["firmware-tbeam0.7-"]
|
||||
case .T_ECHO:
|
||||
case .TECHO:
|
||||
return ["firmware-t-echo-"]
|
||||
case .TLORA_V1_1P3:
|
||||
case .TLORAV11P3:
|
||||
return ["firmware-tlora_v1_3-"]
|
||||
case .RAK4631:
|
||||
return ["firmware-rak4631-", "firmware-rak4631_eink-"]
|
||||
case .HELTEC_V2_1:
|
||||
case .HELTECV21:
|
||||
return ["firmware-heltec-v2.1-"]
|
||||
case .HELTEC_V1:
|
||||
case .HELTECV1:
|
||||
return ["firmware-heltec-v1-"]
|
||||
case .LILYGO_TBEAM_S3_CORE:
|
||||
case .LILYGOTBEAMS3CORE:
|
||||
return ["firmware-tbeam-s3-core-"]
|
||||
case .RAK11200:
|
||||
return ["firmware-rak11200-"]
|
||||
case .NANO_G1:
|
||||
case .NANOG1:
|
||||
return ["firmware-nano-g1-"]
|
||||
case .TLORA_V2_1_1P8:
|
||||
case .TLORAV211P8:
|
||||
return ["firmware-tlora-v2-1-1.8-"]
|
||||
case .TLORA_T3_S3:
|
||||
case .TLORAT3S3:
|
||||
return ["firmware-tlora-t3s3-v1-"]
|
||||
case .NANO_G1_EXPLORER:
|
||||
case .NANOG1EXPLORER:
|
||||
return ["firmware-nano-g1-explorer-"]
|
||||
case .STATION_G1:
|
||||
case .STATIONG1:
|
||||
return ["firmware-station-g1-"]
|
||||
case .M5STACK:
|
||||
return ["firmware-m5stack-core-", "firmware-m5stack-coreink-"]
|
||||
case .HELTEC_V3:
|
||||
case .HELTECV3:
|
||||
return ["firmware-heltec-v3-"]
|
||||
case .HELTEC_WSL_V3:
|
||||
case .HELTECWSLV3:
|
||||
return ["firmware-heltec-wsl-v3-"]
|
||||
}
|
||||
|
||||
|
|
@ -139,47 +139,47 @@ enum HardwareModels: String, CaseIterable, Identifiable {
|
|||
|
||||
case .UNSET:
|
||||
return HardwarePlatforms.NONE
|
||||
case .TLORA_V2:
|
||||
case .TLORAV2:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .TLORA_V1:
|
||||
case .TLORAV1:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .TLORA_V2_1_1P6:
|
||||
case .TLORAV211P6:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .TBEAM:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .HELTEC_V2_0:
|
||||
case .HELTECV20:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .TBEAM_V0P7:
|
||||
case .TBEAMV0P7:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .T_ECHO:
|
||||
case .TECHO:
|
||||
return HardwarePlatforms.NRF52
|
||||
case .TLORA_V1_1P3:
|
||||
case .TLORAV11P3:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .RAK4631:
|
||||
return HardwarePlatforms.NRF52
|
||||
case .HELTEC_V2_1:
|
||||
case .HELTECV21:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .HELTEC_V1:
|
||||
case .HELTECV1:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .LILYGO_TBEAM_S3_CORE:
|
||||
case .LILYGOTBEAMS3CORE:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .RAK11200:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .NANO_G1:
|
||||
case .NANOG1:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .TLORA_V2_1_1P8:
|
||||
case .TLORAV211P8:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .TLORA_T3_S3:
|
||||
case .TLORAT3S3:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .NANO_G1_EXPLORER:
|
||||
case .NANOG1EXPLORER:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .STATION_G1:
|
||||
case .STATIONG1:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .M5STACK:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .HELTEC_V3:
|
||||
case .HELTECV3:
|
||||
return HardwarePlatforms.ESP32
|
||||
case .HELTEC_WSL_V3:
|
||||
case .HELTECWSLV3:
|
||||
return HardwarePlatforms.ESP32
|
||||
}
|
||||
}
|
||||
|
|
@ -189,47 +189,47 @@ enum HardwareModels: String, CaseIterable, Identifiable {
|
|||
|
||||
case .UNSET:
|
||||
return HardwareModel.unset
|
||||
case .TLORA_V2:
|
||||
case .TLORAV2:
|
||||
return HardwareModel.tloraV2
|
||||
case .TLORA_V1:
|
||||
case .TLORAV1:
|
||||
return HardwareModel.tloraV1
|
||||
case .TLORA_V2_1_1P6:
|
||||
case .TLORAV211P6:
|
||||
return HardwareModel.tloraV211P6
|
||||
case .TBEAM:
|
||||
return HardwareModel.tbeam
|
||||
case .HELTEC_V2_0:
|
||||
case .HELTECV20:
|
||||
return HardwareModel.heltecV20
|
||||
case .TBEAM_V0P7:
|
||||
case .TBEAMV0P7:
|
||||
return HardwareModel.tbeamV0P7
|
||||
case .T_ECHO:
|
||||
case .TECHO:
|
||||
return HardwareModel.tEcho
|
||||
case .TLORA_V1_1P3:
|
||||
case .TLORAV11P3:
|
||||
return HardwareModel.tloraV11P3
|
||||
case .RAK4631:
|
||||
return HardwareModel.rak4631
|
||||
case .HELTEC_V2_1:
|
||||
case .HELTECV21:
|
||||
return HardwareModel.heltecV21
|
||||
case .HELTEC_V1:
|
||||
case .HELTECV1:
|
||||
return HardwareModel.heltecV1
|
||||
case .LILYGO_TBEAM_S3_CORE:
|
||||
case .LILYGOTBEAMS3CORE:
|
||||
return HardwareModel.lilygoTbeamS3Core
|
||||
case .RAK11200:
|
||||
return HardwareModel.rak11200
|
||||
case .NANO_G1:
|
||||
case .NANOG1:
|
||||
return HardwareModel.nanoG1
|
||||
case .TLORA_V2_1_1P8:
|
||||
case .TLORAV211P8:
|
||||
return HardwareModel.tloraV211P8
|
||||
case .TLORA_T3_S3:
|
||||
case .TLORAT3S3:
|
||||
return HardwareModel.tloraT3S3
|
||||
case .NANO_G1_EXPLORER:
|
||||
case .NANOG1EXPLORER:
|
||||
return HardwareModel.nanoG1Explorer
|
||||
case .STATION_G1:
|
||||
case .STATIONG1:
|
||||
return HardwareModel.stationG1
|
||||
case .M5STACK:
|
||||
return HardwareModel.m5Stack
|
||||
case .HELTEC_V3:
|
||||
case .HELTECV3:
|
||||
return HardwareModel.heltecV3
|
||||
case .HELTEC_WSL_V3:
|
||||
case .HELTECWSLV3:
|
||||
return HardwareModel.heltecWslV3
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,6 +93,10 @@ struct Firmware: View {
|
|||
} else {
|
||||
Text("OTA Updates are not supported on your platform.")
|
||||
.font(.title3)
|
||||
Text(node?.user?.hwModel ?? "UNSET")
|
||||
.font(.title3)
|
||||
Text(hwModel.platform().description)
|
||||
.font(.title3)
|
||||
}
|
||||
|
||||
}.padding()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue