mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-03 23:40:57 +10:00
Add advanced path management, debug logging, and fix channel sync
New features: - In-app debug log viewer with copy/clear functionality - Advanced path management UI with history and custom path builder - Battery indicator widget with voltage/percentage toggle - Contact/channel filtering and sorting improvements - Repeater command ACK tracking with path history integration Fixes: - Switch channel sync from parallel to sequential to prevent timeouts - Preserve path overrides when contacts refresh from device - Fix ACK hash computation for SMAZ-encoded messages - Proper cleanup of pending operations on disconnect
This commit is contained in:
@@ -592,16 +592,18 @@ Uint8List buildSendCliCommandFrame(
|
||||
Uint8List repeaterPubKey,
|
||||
String command, {
|
||||
int attempt = 0,
|
||||
int? timestampSeconds,
|
||||
}) {
|
||||
final textBytes = utf8.encode(command);
|
||||
final timestamp = DateTime.now().millisecondsSinceEpoch ~/ 1000;
|
||||
final timestamp = timestampSeconds ?? (DateTime.now().millisecondsSinceEpoch ~/ 1000);
|
||||
const prefixSize = 6;
|
||||
final safeAttempt = attempt.clamp(0, 3);
|
||||
final frame = Uint8List(1 + 1 + 1 + 4 + prefixSize + textBytes.length + 1);
|
||||
int offset = 0;
|
||||
|
||||
frame[offset++] = cmdSendTxtMsg;
|
||||
frame[offset++] = txtTypeCliData;
|
||||
frame[offset++] = attempt & 0xFF;
|
||||
frame[offset++] = safeAttempt;
|
||||
writeUint32LE(frame, offset, timestamp);
|
||||
offset += 4;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user