Fix echo metadata and bump build number #123

This commit is contained in:
Janez T
2026-04-26 08:02:53 +02:00
parent f9dfdc2340
commit 4181b33da1
15 changed files with 498 additions and 39 deletions

View File

@@ -1773,7 +1773,13 @@ class AppProvider with ChangeNotifier {
debugPrint(
'🔊 [AppProvider] Echo detected - Message: $messageId, Count: $echoCount',
);
messagesProvider.handleMessageEcho(messageId, echoCount, snrRaw, rssiDbm);
messagesProvider.handleMessageEcho(
messageId,
echoCount,
snrRaw,
rssiDbm,
pathBytes: _latestChannelEchoPathBytes(),
);
};
connectionProvider.prepareDirectMessageSendCallback =
@@ -4056,6 +4062,23 @@ class AppProvider with ChangeNotifier {
return decoded.pathBytes;
}
Uint8List? _latestChannelEchoPathBytes() {
for (final log in connectionProvider.bleService.packetLogs.reversed) {
if (log.responseCode != 0x88) continue;
final decoded = LogRxRouteDecoder.decode(log.rawData);
if (decoded == null ||
decoded.payloadType != 0x05 ||
decoded.pathBytes.isEmpty) {
continue;
}
return Uint8List.fromList(decoded.pathBytes);
}
return null;
}
// Removed _syncMessages() - messages are automatically synced via PUSH_CODE_MSG_WAITING events
// The ConnectionProvider's onMessageWaiting callback handles automatic message fetching