mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-21 16:21:04 +10:00
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,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