Consolidate BufferReader/Writer, add response validation for repeater settings

- Move BufferReader/BufferWriter into meshcore_protocol.dart
- Refactor build functions to use BufferWriter
- Add content-based validation for CLI responses over LoRa
- Add individual refresh buttons for TX power and feature toggles
- Hide unimplemented features (Privacy Mode, Encrypted Advert Interval)
This commit is contained in:
zjs81
2026-01-11 13:44:01 -07:00
parent ffce582b3b
commit bc6c1f1fab
6 changed files with 515 additions and 466 deletions
+3 -4
View File
@@ -1,6 +1,5 @@
import 'dart:typed_data';
import 'buffer_reader.dart';
import 'buffer_writer.dart';
import '../connector/meshcore_protocol.dart';
class CayenneLpp {
static const int lppDigitalInput = 0; // 1 byte
@@ -84,7 +83,7 @@ class CayenneLpp {
final buffer = BufferReader(bytes);
final telemetry = <Map<String, dynamic>>[];
while (buffer.getRemainingBytesCount() >= 2) {
while (buffer.remaining >= 2) {
final channel = buffer.readUInt8();
final type = buffer.readUInt8();
@@ -193,7 +192,7 @@ class CayenneLpp {
final buffer = BufferReader(bytes);
final Map<int, Map<String, dynamic>> channels = {};
while (buffer.getRemainingBytesCount() >= 2) {
while (buffer.remaining >= 2) {
final channel = buffer.readUInt8();
final type = buffer.readUInt8();