mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
remove analog sensors from telemetry, add Card KB as an option for canned messages presets
This commit is contained in:
parent
ce35f49b7c
commit
10bf86cf95
4 changed files with 7 additions and 55 deletions
|
|
@ -72,7 +72,7 @@ struct NodeList: View {
|
|||
.foregroundColor(.accentColor).symbolRenderingMode(.hierarchical)
|
||||
if UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac {
|
||||
|
||||
Text("Currently Connected").font(.headline).foregroundColor(Color.accentColor)
|
||||
Text("Currently Connected").font(.callout).foregroundColor(Color.accentColor)
|
||||
} else {
|
||||
|
||||
Text("Currently Connected").font(.title3).foregroundColor(Color.accentColor)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ enum ConfigPresets : Int, CaseIterable, Identifiable {
|
|||
case unset = 0
|
||||
case rakRotaryEncoder = 1
|
||||
case tbeamThreeButtonScreen = 2
|
||||
|
||||
case cardKB = 3
|
||||
|
||||
var id: Int { self.rawValue }
|
||||
var description: String {
|
||||
get {
|
||||
|
|
@ -24,6 +25,8 @@ enum ConfigPresets : Int, CaseIterable, Identifiable {
|
|||
return "RAK Rotary Encoder Module"
|
||||
case .tbeamThreeButtonScreen:
|
||||
return "TBEAM 3 Button OLED Screen"
|
||||
case .cardKB:
|
||||
return "Card KB"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,21 +11,6 @@ enum SensorTypes: Int, CaseIterable, Identifiable {
|
|||
/// No external telemetry sensor explicitly set
|
||||
case notSet = 0
|
||||
|
||||
/// Moderate accuracy temperature
|
||||
case dht11 = 1
|
||||
|
||||
/// High accuracy temperature
|
||||
case ds18B20 = 2
|
||||
|
||||
/// Moderate accuracy temperature and humidity
|
||||
case dht12 = 3
|
||||
|
||||
/// Moderate accuracy temperature and humidity
|
||||
case dht21 = 4
|
||||
|
||||
/// Moderate accuracy temperature and humidity
|
||||
case dht22 = 5
|
||||
|
||||
/// High accuracy temperature, pressure, humidity
|
||||
case bme280 = 6
|
||||
|
||||
|
|
@ -51,16 +36,6 @@ enum SensorTypes: Int, CaseIterable, Identifiable {
|
|||
|
||||
case .notSet:
|
||||
return "Not Set"
|
||||
case .dht11:
|
||||
return "DHT11 - Temperature"
|
||||
case .ds18B20:
|
||||
return "DS18B20 - Temperature"
|
||||
case .dht12:
|
||||
return "DHT12 - Temperature & humidity"
|
||||
case .dht21:
|
||||
return "DHT21 - Temperature & humidity"
|
||||
case .dht22:
|
||||
return "DHT22 - Temperature & humidity"
|
||||
case .bme280:
|
||||
return "BME280 - Temp, pressure & humidity"
|
||||
case .bme680:
|
||||
|
|
@ -83,16 +58,6 @@ enum SensorTypes: Int, CaseIterable, Identifiable {
|
|||
|
||||
case .notSet:
|
||||
return TelemetrySensorType.notSet
|
||||
case .dht11:
|
||||
return TelemetrySensorType.dht11
|
||||
case .ds18B20:
|
||||
return TelemetrySensorType.ds18B20
|
||||
case .dht12:
|
||||
return TelemetrySensorType.dht12
|
||||
case .dht21:
|
||||
return TelemetrySensorType.dht21
|
||||
case .dht22:
|
||||
return TelemetrySensorType.dht22
|
||||
case .bme280:
|
||||
return TelemetrySensorType.bme280
|
||||
case .bme680:
|
||||
|
|
@ -227,7 +192,6 @@ struct TelemetryConfig: View {
|
|||
@State var environmentSensorType = 0
|
||||
@State var environmentScreenEnabled = false
|
||||
@State var environmentDisplayFahrenheit = false
|
||||
@State var environmentSensorPin = 0
|
||||
@State var environmentRecoveryInterval = 0
|
||||
@State var environmentReadErrorCountThreshold = 0
|
||||
|
||||
|
|
@ -285,20 +249,6 @@ struct TelemetryConfig: View {
|
|||
}
|
||||
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
|
||||
|
||||
Picker("GPIO Pin for sensor readings", selection: $environmentSensorPin) {
|
||||
ForEach(0..<40) {
|
||||
|
||||
if $0 == 0 {
|
||||
|
||||
Text("Unset")
|
||||
|
||||
} else {
|
||||
|
||||
Text("Pin \($0)")
|
||||
}
|
||||
}
|
||||
}
|
||||
.pickerStyle(DefaultPickerStyle())
|
||||
}
|
||||
|
||||
Section(header: Text("Errors")) {
|
||||
|
|
@ -357,7 +307,6 @@ struct TelemetryConfig: View {
|
|||
tc.environmentSensorType = SensorTypes(rawValue: environmentSensorType)!.protoEnumValue()
|
||||
tc.environmentScreenEnabled = environmentScreenEnabled
|
||||
tc.environmentDisplayFahrenheit = environmentDisplayFahrenheit
|
||||
tc.environmentSensorPin = UInt32(environmentSensorPin)
|
||||
tc.environmentRecoveryInterval = UInt32(environmentRecoveryInterval)
|
||||
tc.environmentReadErrorCountThreshold = UInt32(environmentReadErrorCountThreshold)
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ struct UserConfig: View {
|
|||
}
|
||||
.keyboardType(.default)
|
||||
.disableAutocorrection(true)
|
||||
Text("Long name can me 40 bytes long.")
|
||||
Text("Long name can be up to 36 bytes long.")
|
||||
.font(.caption)
|
||||
|
||||
HStack {
|
||||
|
|
@ -78,7 +78,7 @@ struct UserConfig: View {
|
|||
}
|
||||
.keyboardType(.asciiCapable)
|
||||
.disableAutocorrection(true)
|
||||
Text("The short name is used in maps and messaging and will be appended to the last 4 of the device MAC address to set the device's BLE Name. It can be up to 5 bytes long.")
|
||||
Text("The short name is used in maps and messaging and will be appended to the last 4 of the device MAC address to set the device's BLE Name. It can be up to 4 bytes long.")
|
||||
.font(.caption)
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue