mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Channel editor updates
This commit is contained in:
parent
630986487c
commit
5b56125628
3 changed files with 7 additions and 3 deletions
|
|
@ -978,7 +978,6 @@ class BLEManager: NSObject, CBPeripheralDelegate, ObservableObject {
|
|||
meshPacket.from = 0 //UInt32(fromUser.num)
|
||||
meshPacket.id = UInt32.random(in: UInt32(UInt8.max)..<UInt32.max)
|
||||
meshPacket.priority = MeshPacket.Priority.reliable
|
||||
meshPacket.wantAck = true
|
||||
|
||||
var dataMessage = DataMessage()
|
||||
dataMessage.payload = try! adminPacket.serializedData()
|
||||
|
|
|
|||
|
|
@ -1025,7 +1025,11 @@ func adminAppPacket (packet: MeshPacket, context: NSManagedObjectContext) {
|
|||
}
|
||||
|
||||
else if adminMessage.payloadVariant == AdminMessage.OneOf_PayloadVariant.getChannelResponse(adminMessage.getChannelResponse) {
|
||||
print("I am a channel response")
|
||||
|
||||
if let channel = try? Channel(serializedData: packet.decoded.payload) {
|
||||
print("got a channel over the admin channel")
|
||||
//channelPacket(channel: channel, fromNum: Int64(packet.from), context: context)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -257,7 +257,8 @@ struct Channels: View {
|
|||
self.isPresentingEditView = false
|
||||
channelName = ""
|
||||
hasChanges = false
|
||||
// Would rather send a getChannel but I can't seem to tell what admin message it is
|
||||
// Would rather send a getChannel but I can't seem serialize it properly yet
|
||||
//bleManager.getChannel(channel: channel, fromUser: node!.user!, toUser: node!.user!)
|
||||
bleManager.sendWantConfig()
|
||||
}
|
||||
} label: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue