mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-01 14:40:32 +10:00
feat: Enhance MeshCoreConnector with storage metrics and improve error handling
- Added storageUsedKb and storageTotalKb properties to MeshCoreConnector. - Updated battery and storage frame parsing with improved error handling. - Refactored log RX data handling to use BufferReader for better readability and error management. - Enhanced message parsing in ChannelMessage and Message classes to utilize BufferReader. - Introduced new text type for signed messages in meshcore_protocol.dart. - Updated BLE debug log screen to use BufferReader for payload parsing. - Refactored message retry service to handle ACK hashes as integers instead of Uint8List. - Improved message storage serialization and deserialization to accommodate new expectedAckHash type. - Added wasPulled property to Contact model for better state management.
This commit is contained in:
@@ -245,6 +245,19 @@ class BleDebugLogService extends ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
// Helper to read uint32 little-endian
|
||||
int readUint32LE(Uint8List data, int offset) {
|
||||
return data[offset] |
|
||||
(data[offset + 1] << 8) |
|
||||
(data[offset + 2] << 16) |
|
||||
(data[offset + 3] << 24);
|
||||
}
|
||||
|
||||
// // Helper to read uint16 little-endian
|
||||
int readUint16LE(Uint8List data, int offset) {
|
||||
return data[offset] | (data[offset + 1] << 8);
|
||||
}
|
||||
|
||||
String _frameDetail(int code, Uint8List frame) {
|
||||
switch (code) {
|
||||
case respCodeSent:
|
||||
|
||||
Reference in New Issue
Block a user