mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
SwiftLint Whitespace fixes
This commit is contained in:
parent
c3cbe9fb57
commit
fdade220de
104 changed files with 1644 additions and 1832 deletions
|
|
@ -7,13 +7,13 @@
|
|||
import SwiftUI
|
||||
|
||||
struct ExternalNotificationConfig: View {
|
||||
|
||||
|
||||
@Environment(\.managedObjectContext) var context
|
||||
@EnvironmentObject var bleManager: BLEManager
|
||||
@Environment(\.dismiss) private var goBack
|
||||
|
||||
|
||||
var node: NodeInfoEntity?
|
||||
|
||||
|
||||
@State private var isPresentingSaveConfirm: Bool = false
|
||||
@State var hasChanges = false
|
||||
@State var enabled = false
|
||||
|
|
@ -30,9 +30,9 @@ struct ExternalNotificationConfig: View {
|
|||
@State var outputVibra = 0
|
||||
@State var outputMilliseconds = 0
|
||||
@State var nagTimeout = 0
|
||||
|
||||
|
||||
var body: some View {
|
||||
|
||||
|
||||
Form {
|
||||
Section(header: Text("options")) {
|
||||
Toggle(isOn: $enabled) {
|
||||
|
|
@ -58,8 +58,7 @@ struct ExternalNotificationConfig: View {
|
|||
Section(header: Text("Primary GPIO")
|
||||
.font(.caption)
|
||||
.foregroundColor(.gray)
|
||||
.textCase(.uppercase))
|
||||
{
|
||||
.textCase(.uppercase)) {
|
||||
Toggle(isOn: $active) {
|
||||
Label("Active", systemImage: "togglepower")
|
||||
}
|
||||
|
|
@ -93,12 +92,11 @@ struct ExternalNotificationConfig: View {
|
|||
Text("Specifies how long the monitored GPIO should output.")
|
||||
.font(.caption)
|
||||
}
|
||||
|
||||
|
||||
Section(header: Text("Optional GPIO")
|
||||
.font(.caption)
|
||||
.foregroundColor(.gray)
|
||||
.textCase(.uppercase))
|
||||
{
|
||||
.textCase(.uppercase)) {
|
||||
Toggle(isOn: $alertBellBuzzer) {
|
||||
Label("Alert GPIO buzzer when receiving a bell", systemImage: "bell")
|
||||
}
|
||||
|
|
@ -174,7 +172,7 @@ struct ExternalNotificationConfig: View {
|
|||
enc.outputMs = UInt32(outputMilliseconds)
|
||||
enc.usePwm = usePWM
|
||||
let adminMessageId = bleManager.saveExternalNotificationModuleConfig(config: enc, fromUser: connectedNode!.user!, toUser: node!.user!, adminIndex: connectedNode?.myInfo?.adminIndex ?? 0)
|
||||
if adminMessageId > 0{
|
||||
if adminMessageId > 0 {
|
||||
// Should show a saved successfully alert once I know that to be true
|
||||
// for now just disable the button after a successful save
|
||||
hasChanges = false
|
||||
|
|
@ -208,7 +206,7 @@ struct ExternalNotificationConfig: View {
|
|||
self.nagTimeout = Int(node?.externalNotificationConfig?.nagTimeout ?? 0)
|
||||
self.usePWM = node?.externalNotificationConfig?.usePWM ?? false
|
||||
self.hasChanges = false
|
||||
|
||||
|
||||
// Need to request a TelemetryModuleConfig from the remote node before allowing changes
|
||||
if bleManager.connectedPeripheral != nil && node?.externalNotificationConfig == nil {
|
||||
print("empty external notification module config")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue