File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ def _handleLogLine(self, line: str) -> None:
150150 """Handle a line of log output from the device."""
151151 pub .sendMessage ("meshtastic.log.line" , line = line , interface = self )
152152
153+ def _handleLogRecord (self , record : mesh_pb2 .LogRecord ) -> None :
154+ """Handle a log record which was received encapsulated in a protobuf."""
155+ # For now we just try to format the line as if it had come in over the serial port
156+ self ._handleLogLine (record .message )
157+
153158 def showInfo (self , file = sys .stdout ) -> str : # pylint: disable=W0613
154159 """Show human readable summary about this object"""
155160 owner = f"Owner: { self .getLongName ()} ({ self .getShortName ()} )"
@@ -927,7 +932,8 @@ def _handleFromRadio(self, fromRadioBytes):
927932 self ._handleChannel (fromRadio .channel )
928933 elif fromRadio .HasField ("packet" ):
929934 self ._handlePacketFromRadio (fromRadio .packet )
930-
935+ elif fromRadio .HasField ("log_record" ):
936+ self ._handleLogRecord (fromRadio .log_record )
931937 elif fromRadio .HasField ("queueStatus" ):
932938 self ._handleQueueStatusFromRadio (fromRadio .queueStatus )
933939
You can’t perform that action at this time.
0 commit comments