mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor: subscribe MQTT channels with downlink_enabled
This commit is contained in:
parent
5ece09b4ce
commit
47bc9218dc
2 changed files with 25 additions and 7 deletions
|
|
@ -30,6 +30,12 @@ fun Uri.toChannelSet(): ChannelSet {
|
|||
return ChannelSet.parseFrom(bytes)
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A list of globally unique channel IDs usable with MQTT subscribe()
|
||||
*/
|
||||
val ChannelSet.subscribeList: List<String>
|
||||
get() = settingsList.filter { it.downlinkEnabled }.map { Channel(it, loraConfig).name }
|
||||
|
||||
/**
|
||||
* Return the primary channel info
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue