Add 48 as a GPIO pin

This commit is contained in:
Garth Vander Houwen 2024-01-22 13:21:17 -08:00
parent f05777919d
commit bc3fc5e50c
8 changed files with 21 additions and 15 deletions

View file

@ -796,7 +796,7 @@ func textMessageAppPacket(packet: MeshPacket, blockRangeTest: Bool, connectedNod
subtitle: "AKA \(newMessage.fromUser?.shortName ?? "?")",
content: messageText,
target: "message",
path: "meshtastic://messages/dm/user/\(newMessage.fromUser?.num ?? 0)/message/\(newMessage.messageId)"
path: "meshtastic://open-dm?userid=\(newMessage.fromUser?.num ?? 0)&id=\(newMessage.messageId)"
)
]
manager.schedule()

View file

@ -103,7 +103,7 @@ struct DeviceConfig: View {
}
Section(header: Text("GPIO")) {
Picker("Button GPIO", selection: $buttonGPIO) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {
@ -113,7 +113,7 @@ struct DeviceConfig: View {
}
.pickerStyle(DefaultPickerStyle())
Picker("Buzzer GPIO", selection: $buzzerGPIO) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {

View file

@ -124,7 +124,7 @@ struct CannedMessagesConfig: View {
.disabled(configPreset > 0)
Section(header: Text("Inputs")) {
Picker("Pin A", selection: $inputbrokerPinA) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {
@ -136,7 +136,7 @@ struct CannedMessagesConfig: View {
Text("GPIO pin for rotary encoder A port.")
.font(.caption)
Picker("Pin B", selection: $inputbrokerPinB) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {
@ -148,7 +148,7 @@ struct CannedMessagesConfig: View {
Text("GPIO pin for rotary encoder B port.")
.font(.caption)
Picker("Press Pin", selection: $inputbrokerPinPress) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {

View file

@ -139,7 +139,7 @@ struct DetectionSensorConfig: View {
.listRowSeparator(.visible)
.offset(y: -10)
Picker("GPIO Pin to monitor", selection: $monitorPin) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {

View file

@ -99,7 +99,7 @@ struct ExternalNotificationConfig: View {
Text("If enabled, the 'output' Pin will be pulled active high, disabled means active low.")
.font(.caption)
Picker("Output pin GPIO", selection: $output) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {
@ -147,7 +147,7 @@ struct ExternalNotificationConfig: View {
}
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
Picker("Output pin buzzer GPIO ", selection: $outputBuzzer) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {
@ -157,7 +157,7 @@ struct ExternalNotificationConfig: View {
}
.pickerStyle(DefaultPickerStyle())
Picker("Output pin vibra GPIO", selection: $outputVibra) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {

View file

@ -99,7 +99,7 @@ struct SerialConfig: View {
Section(header: Text("GPIO")) {
Picker("Receive data (rxd) GPIO pin", selection: $rxd) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {
@ -110,7 +110,7 @@ struct SerialConfig: View {
.pickerStyle(DefaultPickerStyle())
Picker("Transmit data (txd) GPIO pin", selection: $txd) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {

View file

@ -213,7 +213,7 @@ struct PositionConfig: View {
if deviceGpsEnabled {
Picker("GPS Receive GPIO", selection: $rxGpio) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {
@ -223,7 +223,7 @@ struct PositionConfig: View {
}
.pickerStyle(DefaultPickerStyle())
Picker("GPS Transmit GPIO", selection: $txGpio) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {
@ -233,7 +233,7 @@ struct PositionConfig: View {
}
.pickerStyle(DefaultPickerStyle())
Picker("GPS EN GPIO", selection: $gpsEnGpio) {
ForEach(0..<48) {
ForEach(0..<49) {
if $0 == 0 {
Text("unset")
} else {

View file

@ -257,6 +257,12 @@ struct RouteRecorder: View {
.presentationDetents([.fraction(0.30), .fraction(0.65)])
.presentationDragIndicator(.hidden)
.interactiveDismissDisabled(false)
.onAppear {
UIApplication.shared.isIdleTimerDisabled = true
}
.onDisappear(perform: {
UIApplication.shared.isIdleTimerDisabled = false
})
.onChange(of: locationsHandler.locationsArray.last) { newLoc in
if locationsHandler.isRecording {
if let loc = newLoc {