mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Device hardware updates
This commit is contained in:
parent
80dba6eccd
commit
e8b6f00dc2
3 changed files with 73 additions and 23 deletions
|
|
@ -5,7 +5,7 @@
|
|||
"platformioTarget": "tlora-v2",
|
||||
"architecture": "esp32",
|
||||
"activelySupported": false,
|
||||
"displayName": "T-LoRa V2"
|
||||
"displayName": "LILYGO T-LoRa V2"
|
||||
},
|
||||
{
|
||||
"hwModel": 2,
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
"platformioTarget": "tlora-v1",
|
||||
"architecture": "esp32",
|
||||
"activelySupported": false,
|
||||
"displayName": "T-LoRa V1"
|
||||
"displayName": "LILYGO T-LoRa V1"
|
||||
},
|
||||
{
|
||||
"hwModel": 3,
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
"platformioTarget": "tlora-v2-1-1_6",
|
||||
"architecture": "esp32",
|
||||
"activelySupported": true,
|
||||
"displayName": "T-LoRa V2.1-1.6"
|
||||
"displayName": "LILYGO T-LoRa V2.1-1.6"
|
||||
},
|
||||
{
|
||||
"hwModel": 4,
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
"platformioTarget": "tbeam",
|
||||
"architecture": "esp32",
|
||||
"activelySupported": true,
|
||||
"displayName": "T-Beam"
|
||||
"displayName": "LILYGO T-Beam"
|
||||
},
|
||||
{
|
||||
"hwModel": 5,
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
"platformioTarget": "tbeam0_7",
|
||||
"architecture": "esp32",
|
||||
"activelySupported": false,
|
||||
"displayName": "T-Beam V0.7"
|
||||
"displayName": "LILYGO T-Beam V0.7"
|
||||
},
|
||||
{
|
||||
"hwModel": 7,
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
"platformioTarget": "t-echo",
|
||||
"architecture": "nrf52840",
|
||||
"activelySupported": true,
|
||||
"displayName": "T-Echo"
|
||||
"displayName": "LILYGO T-Echo"
|
||||
},
|
||||
{
|
||||
"hwModel": 8,
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
"platformioTarget": "tlora-v1_3",
|
||||
"architecture": "esp32",
|
||||
"activelySupported": false,
|
||||
"displayName": "T-LoRa V1.1-1.3"
|
||||
"displayName": "LILYGO T-LoRa V1.1-1.3"
|
||||
},
|
||||
{
|
||||
"hwModel": 9,
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
"platformioTarget": "rak4631",
|
||||
"architecture": "nrf52840",
|
||||
"activelySupported": true,
|
||||
"displayName": "RAK4631"
|
||||
"displayName": "RAK WisBlock 4631"
|
||||
},
|
||||
{
|
||||
"hwModel": 10,
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
"platformioTarget": "tbeam-s3-core",
|
||||
"architecture": "esp32-s3",
|
||||
"activelySupported": true,
|
||||
"displayName": "T-Beam S3 Core"
|
||||
"displayName": "LILYGO T-Beam S3 Core"
|
||||
},
|
||||
{
|
||||
"hwModel": 13,
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
"platformioTarget": "rak11200",
|
||||
"architecture": "esp32",
|
||||
"activelySupported": false,
|
||||
"displayName": "RAK11200"
|
||||
"displayName": "RAK WisBlock 11200"
|
||||
},
|
||||
{
|
||||
"hwModel": 14,
|
||||
|
|
@ -117,7 +117,7 @@
|
|||
"platformioTarget": "tlora-v2-1-1_8",
|
||||
"architecture": "esp32",
|
||||
"activelySupported": true,
|
||||
"displayName": "T-LoRa V2.1-1.8"
|
||||
"displayName": "LILYGO T-LoRa V2.1-1.8"
|
||||
},
|
||||
{
|
||||
"hwModel": 16,
|
||||
|
|
@ -125,7 +125,7 @@
|
|||
"platformioTarget": "tlora-t3s3-v1",
|
||||
"architecture": "esp32-s3",
|
||||
"activelySupported": true,
|
||||
"displayName": "T-LoRa T3-S3"
|
||||
"displayName": "LILYGO T-LoRa T3-S3"
|
||||
},
|
||||
{
|
||||
"hwModel": 17,
|
||||
|
|
@ -143,6 +143,14 @@
|
|||
"activelySupported": true,
|
||||
"displayName": "Nano G2 Ultra"
|
||||
},
|
||||
{
|
||||
"hwModel": 21,
|
||||
"hwModelSlug": "WIO_WM1110",
|
||||
"platformioTarget": "wio-tracker-wm1110",
|
||||
"architecture": "nrf52840",
|
||||
"activelySupported": true,
|
||||
"displayName": "Seeed Wio WM1110 Tracker"
|
||||
},
|
||||
{
|
||||
"hwModel": 25,
|
||||
"hwModelSlug": "STATION_G1",
|
||||
|
|
@ -157,7 +165,7 @@
|
|||
"platformioTarget": "rak11310",
|
||||
"architecture": "rp2040",
|
||||
"activelySupported": true,
|
||||
"displayName": "RAK11310"
|
||||
"displayName": "RAK WisBlock 11310"
|
||||
},
|
||||
{
|
||||
"hwModel": 29,
|
||||
|
|
@ -165,7 +173,7 @@
|
|||
"platformioTarget": "canaryone",
|
||||
"architecture": "nrf52840",
|
||||
"activelySupported": true,
|
||||
"displayName": "CanaryOne"
|
||||
"displayName": "Canary One"
|
||||
},
|
||||
{
|
||||
"hwModel": 30,
|
||||
|
|
@ -277,7 +285,7 @@
|
|||
"platformioTarget": "t-deck",
|
||||
"architecture": "esp32-s3",
|
||||
"activelySupported": true,
|
||||
"displayName": "T-Deck"
|
||||
"displayName": "LILYGO T-Deck"
|
||||
},
|
||||
{
|
||||
"hwModel": 51,
|
||||
|
|
@ -285,7 +293,7 @@
|
|||
"platformioTarget": "t-watch-s3",
|
||||
"architecture": "esp32-s3",
|
||||
"activelySupported": true,
|
||||
"displayName": "T-Watch S3"
|
||||
"displayName": "LILYGO T-Watch S3"
|
||||
},
|
||||
{
|
||||
"hwModel": 52,
|
||||
|
|
@ -360,11 +368,27 @@
|
|||
"displayName": "RadioMaster 900 Bandit Nano"
|
||||
},
|
||||
{
|
||||
"hwModel": 21,
|
||||
"hwModelSlug": "WIO_WM1110",
|
||||
"platformioTarget": "wio-tracker-wm1110",
|
||||
"hwModel": 67,
|
||||
"hwModelSlug": "HELTEC_VISION_MASTER_E213",
|
||||
"platformioTarget": "heltec-vision-master-e213",
|
||||
"architecture": "esp32-s3",
|
||||
"activelySupported": true,
|
||||
"displayName": "Heltec Vision Master E213"
|
||||
},
|
||||
{
|
||||
"hwModel": 68,
|
||||
"hwModelSlug": "HELTEC_VISION_MASTER_E290",
|
||||
"platformioTarget": "heltec-vision-master-e290",
|
||||
"architecture": "esp32-s3",
|
||||
"activelySupported": true,
|
||||
"displayName": "Heltec Vision Master E290"
|
||||
},
|
||||
{
|
||||
"hwModel": 71,
|
||||
"hwModelSlug": "TRACKER_T1000_E",
|
||||
"platformioTarget": "tracker-t1000-e",
|
||||
"architecture": "nrf52840",
|
||||
"activelySupported": true,
|
||||
"displayName": "Seeed Wio WM1110 Tracker"
|
||||
"displayName": "Seeed Card Tracker T1000-E"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -11,8 +11,9 @@ import MapKit
|
|||
|
||||
struct NodeInfoItem: View {
|
||||
|
||||
@ObservedObject
|
||||
var node: NodeInfoEntity
|
||||
@ObservedObject var node: NodeInfoEntity
|
||||
@State private var currentDevice: DeviceHardware?
|
||||
@State private var deviceHardware: [DeviceHardware] = []
|
||||
|
||||
var modemPreset: ModemPresets = ModemPresets(
|
||||
rawValue: UserDefaults.modemPreset
|
||||
|
|
@ -29,7 +30,7 @@ struct NodeInfoItem: View {
|
|||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: 65, height: 65)
|
||||
.cornerRadius(5)
|
||||
Text(String(node.user!.hwModel ?? "unset".localized))
|
||||
Text(String(currentDevice?.displayName ?? (node.user?.hwModel ?? "unset".localized)))
|
||||
.font(.callout)
|
||||
} else {
|
||||
Image(systemName: "person.crop.circle.badge.questionmark")
|
||||
|
|
@ -41,6 +42,30 @@ struct NodeInfoItem: View {
|
|||
.font(.callout)
|
||||
}
|
||||
}
|
||||
.onAppear(perform: {
|
||||
if currentDevice == nil {
|
||||
Api().loadDeviceHardwareData { (hw) in
|
||||
for device in hw {
|
||||
let currentHardware = node.user?.hwModel ?? "UNSET"
|
||||
let deviceString = device.hwModelSlug.replacingOccurrences(of: "_", with: "")
|
||||
if deviceString == currentHardware {
|
||||
currentDevice = device
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.onChange(of: node) { newNode in
|
||||
Api().loadDeviceHardwareData { (hw) in
|
||||
for device in hw {
|
||||
let currentHardware = newNode.user?.hwModel ?? "UNSET"
|
||||
let deviceString = device.hwModelSlug.replacingOccurrences(of: "_", with: "")
|
||||
if deviceString == currentHardware {
|
||||
currentDevice = device
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
HStack(alignment: .center) {
|
||||
Spacer()
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ struct NodeList: View {
|
|||
@State private var isPresentingDeleteNodeAlert = false
|
||||
@State private var deleteNodeId: Int64 = 0
|
||||
|
||||
|
||||
var boolFilters: [Bool] {[
|
||||
isOnline,
|
||||
isFavorite,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue