mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
myInfo data for both peripheral and node info model fixed data loading and cleaned up models
This commit is contained in:
parent
c1200569fb
commit
ebf243f203
9 changed files with 127 additions and 61 deletions
|
|
@ -8,7 +8,7 @@ struct NodeInfoModel: Identifiable, Codable {
|
|||
|
||||
var id: UInt32
|
||||
var num: UInt32
|
||||
|
||||
var myInfo: MyInfoModel?
|
||||
var user: User
|
||||
struct User: Identifiable, Codable {
|
||||
var id: String
|
||||
|
|
|
|||
16
MeshtasticClient/Model/PeripheralModel.swift
Normal file
16
MeshtasticClient/Model/PeripheralModel.swift
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import Foundation
|
||||
|
||||
final class Peripheral: Identifiable {
|
||||
var id: String
|
||||
var name: String
|
||||
var rssi: Int
|
||||
|
||||
var myInfo: MyInfoModel?
|
||||
|
||||
init(id: String, name: String, rssi: Int, myInfo: MyInfoModel?) {
|
||||
self.id = id
|
||||
self.name = name
|
||||
self.rssi = rssi
|
||||
self.myInfo = myInfo
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue