mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
Fix echo metadata and bump build number #123
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user