show ota update progress in bytes

This commit is contained in:
Laura Klünder 2023-11-30 22:31:42 +01:00
parent e579cb53b6
commit 62e97b0b2f
3 changed files with 20 additions and 4 deletions

View file

@ -595,6 +595,9 @@ class MeshUIConsumer(AsyncJsonWebsocketConsumer):
if content.get("subscribe", None) == "ranging":
await self.channel_layer.group_add("mesh_msg_received", self.channel_name)
self.msg_received_filter = {"msg_type": MeshMessageType.LOCATE_RANGE_RESULTS.name}
if content.get("subscribe", None) == "ota":
await self.channel_layer.group_add("mesh_msg_received", self.channel_name)
self.msg_received_filter = {"msg_type": MeshMessageType.OTA_STATUS.name}
if "send_msg" in content:
msg_to_send = self.scope["session"].pop("mesh_msg_%s" % content["send_msg"], None)
if not msg_to_send: