feat(ble): Add support for LogRadio characteristic, enhance logs (#3691)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2025-11-13 13:53:37 -06:00 committed by GitHub
parent ac5412b499
commit 6590ea0ef0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 318 additions and 143 deletions

View file

@ -238,7 +238,6 @@ internal fun DebugItem(
val messageAnnotatedString = rememberAnnotatedLogMessage(log, searchText)
Text(
text = messageAnnotatedString,
softWrap = false,
style =
TextStyle(
fontSize = if (isSelected) 12.sp else 9.sp,

View file

@ -267,6 +267,7 @@ constructor(
/** Transform the input [MeshLog] by enhancing the raw message with annotations. */
private fun annotateMeshLogMessage(meshLog: MeshLog): String = when (meshLog.message_type) {
"LogRecord" -> meshLog.fromRadio.logRecord.toString().replace("\\n\"", "\"")
"Packet" -> meshLog.meshPacket?.let { packet -> annotatePacketLog(packet) } ?: meshLog.raw_message
"NodeInfo" ->
meshLog.nodeInfo?.let { nodeInfo -> annotateRawMessage(meshLog.raw_message, nodeInfo.num) }