mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: Add Status Message module support (#4163)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
df592d4d86
commit
355d2260e8
15 changed files with 1195 additions and 9 deletions
|
|
@ -90,10 +90,11 @@ data class DataPacket(
|
|||
/** If this is a text message, return the string, otherwise null */
|
||||
val text: String?
|
||||
get() =
|
||||
if (dataType == Portnums.PortNum.TEXT_MESSAGE_APP_VALUE) {
|
||||
bytes?.decodeToString()
|
||||
} else {
|
||||
null
|
||||
when (dataType) {
|
||||
Portnums.PortNum.TEXT_MESSAGE_APP_VALUE -> bytes?.decodeToString()
|
||||
// Portnums.PortNum.NODE_STATUS_APP_VALUE ->
|
||||
// MeshProtos.StatusMessage.parseFrom(bytes).status
|
||||
else -> null
|
||||
}
|
||||
|
||||
val alert: String?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue