Meshtastic-Apple/Widgets/MeshActivityAttributes.swift
Garth Vander Houwen a5a2679f3d
Carplay communications (#1676)
* Carplay communications app templates

* Carplay tests

* Translate intents so there are no warnings

* Document siri messaging commands

* Send messages from carplay

* Don't try and use live activity on mac
2026-04-17 21:58:13 -07:00

40 lines
981 B
Swift

//
// MeshActivityAttributes.swift
// Meshtastic
//
// Created by Garth Vander Houwen on 3/1/23.
//
#if !targetEnvironment(macCatalyst)
#if canImport(ActivityKit)
import ActivityKit
import WidgetKit
import SwiftUI
struct MeshActivityAttributes: ActivityAttributes {
public typealias MeshActivityStatus = ContentState
public struct ContentState: Codable, Hashable {
// Dynamic stateful properties about your activity go here!
var uptimeSeconds: UInt32?
var channelUtilization: Float?
var airtime: Float?
var sentPackets: UInt32
var receivedPackets: UInt32
var badReceivedPackets: UInt32
var dupeReceivedPackets: UInt32
var packetsSentRelay: UInt32
var packetsCanceledRelay: UInt32
var nodesOnline: UInt32
var totalNodes: UInt32
public var numTxRelayCanceled: UInt32 = 0
var timerRange: ClosedRange<Date>
}
// Fixed non-changing properties about your activity go here!
var nodeNum: Int
var name: String
var shortName: String
}
#endif
#endif