feat: add fromRadio client notification

This commit is contained in:
andrekir
2024-08-25 10:55:55 -03:00
parent f85bcac5aa
commit dd00f79241

View File

@@ -1257,6 +1257,9 @@ class MeshService : Service(), Logging {
MeshProtos.FromRadio.QUEUESTATUS_FIELD_NUMBER -> handleQueueStatus(proto.queueStatus)
MeshProtos.FromRadio.METADATA_FIELD_NUMBER -> handleMetadata(proto.metadata)
MeshProtos.FromRadio.MQTTCLIENTPROXYMESSAGE_FIELD_NUMBER -> handleMqttProxyMessage(proto.mqttClientProxyMessage)
MeshProtos.FromRadio.CLIENTNOTIFICATION_FIELD_NUMBER -> {
handleClientNotification(proto.clientNotification)
}
else -> errormsg("Unexpected FromRadio variant")
}
} catch (ex: InvalidProtocolBufferException) {
@@ -1477,6 +1480,11 @@ class MeshService : Service(), Logging {
}
}
private fun handleClientNotification(notification: MeshProtos.ClientNotification) {
debug("Received clientNotification ${notification.toOneLineString()}")
radioConfigRepository.setErrorMessage(notification.message)
}
/**
* Connect, subscribe and receive Flow of MqttClientProxyMessage (toRadio)
*/