mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: add channel editor (#627)
This commit is contained in:
parent
c821eb3681
commit
e5a860cb36
8 changed files with 561 additions and 104 deletions
|
|
@ -250,6 +250,12 @@ class UIViewModel @Inject constructor(
|
|||
"Request getOwner error"
|
||||
)
|
||||
|
||||
fun getChannel(destNum: Int, index: Int) = request(
|
||||
destNum,
|
||||
{ service, packetId, dest -> service.getRemoteChannel(packetId, dest, index) },
|
||||
"Request getChannel error"
|
||||
)
|
||||
|
||||
fun getConfig(destNum: Int, configType: Int) = request(
|
||||
destNum,
|
||||
{ service, packetId, dest -> service.getRemoteConfig(packetId, dest, configType) },
|
||||
|
|
@ -452,6 +458,10 @@ class UIViewModel @Inject constructor(
|
|||
this._channelSet = channelSet.protobuf
|
||||
}
|
||||
|
||||
fun setRemoteChannel(destNum: Int, channel: ChannelProtos.Channel) {
|
||||
meshService?.setRemoteChannel(destNum, channel.toByteArray())
|
||||
}
|
||||
|
||||
/// our name in hte radio
|
||||
/// Note, we generate owner initials automatically for now
|
||||
/// our activity will read this from prefs or set it to the empty string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue