Meshtastic-Apple/MeshtasticClient/Model/Device.swift
2021-08-20 07:56:05 -07:00

37 lines
756 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
See LICENSE folder for this apps 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 }
}