mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
37 lines
756 B
Swift
37 lines
756 B
Swift
/*
|
||
See LICENSE folder for this app’s licensing information.
|
||
|
||
Abstract:
|
||
A representation of a single device.
|
||
*/
|
||
|
||
import Foundation
|
||
import SwiftUI
|
||
import CoreLocation
|
||
|
||
struct Device: Hashable, Codable, Identifiable {
|
||
|
||
var longName: String
|
||
var shortName: String
|
||
var id: String
|
||
var region: String
|
||
var hasGPS: Bool
|
||
var isRouter: Bool
|
||
var firmwareVersion: String
|
||
var hardwareModel: String
|
||
var lastHeard: Double
|
||
var snr: Double
|
||
|
||
private var imageName: String
|
||
var image: Image {
|
||
Image(imageName)
|
||
}
|
||
|
||
var position: Position
|
||
|
||
struct Position: Hashable, Codable {
|
||
var latitude: Double
|
||
var longitude: Double
|
||
var altitude: Int
|
||
var batteryLevel: Int }
|
||
}
|