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:
1 parent
ffce582b3b
commit
bc6c1f1fab
6 files changed
+515
-466
No files matched your search
@@ -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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user