mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Proto updates
This commit is contained in:
parent
def589113b
commit
8befd33bce
4 changed files with 23 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ enum RegionCodes : Int, CaseIterable, Identifiable {
|
|||
case `in` = 10
|
||||
case nz865 = 11
|
||||
case th = 12
|
||||
case lora24 = 13
|
||||
|
||||
var id: Int { self.rawValue }
|
||||
var description: String {
|
||||
|
|
@ -53,6 +54,8 @@ enum RegionCodes : Int, CaseIterable, Identifiable {
|
|||
return "New Zealand 865mhz"
|
||||
case .th:
|
||||
return "Thailand"
|
||||
case .lora24:
|
||||
return "2.4 GHZ"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -87,6 +90,8 @@ enum RegionCodes : Int, CaseIterable, Identifiable {
|
|||
return Config.LoRaConfig.RegionCode.nz865
|
||||
case .th:
|
||||
return Config.LoRaConfig.RegionCode.th
|
||||
case .lora24:
|
||||
return Config.LoRaConfig.RegionCode.lora24
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ enum SerialModeTypes: Int, CaseIterable, Identifiable {
|
|||
case simple = 1
|
||||
case proto = 2
|
||||
case txtmsg = 3
|
||||
case nmea = 4
|
||||
|
||||
var id: Int { self.rawValue }
|
||||
var description: String {
|
||||
|
|
@ -124,6 +125,8 @@ enum SerialModeTypes: Int, CaseIterable, Identifiable {
|
|||
return "Protobufs"
|
||||
case .txtmsg:
|
||||
return "Text Message"
|
||||
case .nmea:
|
||||
return "NMEA Positions"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -139,6 +142,8 @@ enum SerialModeTypes: Int, CaseIterable, Identifiable {
|
|||
return ModuleConfig.SerialConfig.Serial_Mode.proto
|
||||
case .txtmsg:
|
||||
return ModuleConfig.SerialConfig.Serial_Mode.textmsg
|
||||
case .nmea:
|
||||
return ModuleConfig.SerialConfig.Serial_Mode.nmea
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -777,6 +777,10 @@ struct Config {
|
|||
///
|
||||
/// Thailand
|
||||
case th // = 12
|
||||
|
||||
///
|
||||
/// WLAN Band
|
||||
case lora24 // = 13
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
init() {
|
||||
|
|
@ -798,6 +802,7 @@ struct Config {
|
|||
case 10: self = .in
|
||||
case 11: self = .nz865
|
||||
case 12: self = .th
|
||||
case 13: self = .lora24
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
|
@ -817,6 +822,7 @@ struct Config {
|
|||
case .in: return 10
|
||||
case .nz865: return 11
|
||||
case .th: return 12
|
||||
case .lora24: return 13
|
||||
case .UNRECOGNIZED(let i): return i
|
||||
}
|
||||
}
|
||||
|
|
@ -1032,6 +1038,7 @@ extension Config.LoRaConfig.RegionCode: CaseIterable {
|
|||
.in,
|
||||
.nz865,
|
||||
.th,
|
||||
.lora24,
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -1709,6 +1716,7 @@ extension Config.LoRaConfig.RegionCode: SwiftProtobuf._ProtoNameProviding {
|
|||
10: .same(proto: "IN"),
|
||||
11: .same(proto: "NZ_865"),
|
||||
12: .same(proto: "TH"),
|
||||
13: .same(proto: "LORA_24"),
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -331,6 +331,7 @@ struct ModuleConfig {
|
|||
case simple // = 1
|
||||
case proto // = 2
|
||||
case textmsg // = 3
|
||||
case nmea // = 4
|
||||
case UNRECOGNIZED(Int)
|
||||
|
||||
init() {
|
||||
|
|
@ -343,6 +344,7 @@ struct ModuleConfig {
|
|||
case 1: self = .simple
|
||||
case 2: self = .proto
|
||||
case 3: self = .textmsg
|
||||
case 4: self = .nmea
|
||||
default: self = .UNRECOGNIZED(rawValue)
|
||||
}
|
||||
}
|
||||
|
|
@ -353,6 +355,7 @@ struct ModuleConfig {
|
|||
case .simple: return 1
|
||||
case .proto: return 2
|
||||
case .textmsg: return 3
|
||||
case .nmea: return 4
|
||||
case .UNRECOGNIZED(let i): return i
|
||||
}
|
||||
}
|
||||
|
|
@ -653,6 +656,7 @@ extension ModuleConfig.SerialConfig.Serial_Mode: CaseIterable {
|
|||
.simple,
|
||||
.proto,
|
||||
.textmsg,
|
||||
.nmea,
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -1006,6 +1010,7 @@ extension ModuleConfig.SerialConfig.Serial_Mode: SwiftProtobuf._ProtoNameProvidi
|
|||
1: .same(proto: "SIMPLE"),
|
||||
2: .same(proto: "PROTO"),
|
||||
3: .same(proto: "TEXTMSG"),
|
||||
4: .same(proto: "NMEA"),
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue