mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-14 22:55:12 +10:00
Update byte skipping logic and improve clarity in MeshCoreConnector and ChannelMessage
This commit is contained in:
@@ -129,11 +129,11 @@ class ChannelMessage {
|
||||
if (code == respCodeChannelMsgRecvV3) {
|
||||
reader.skipBytes(1); // Skip SNR
|
||||
final flags = reader.readByte();
|
||||
final hasPath = (flags & 0x01) != 0;
|
||||
reader.skipBytes(1); // Skip reserved byte
|
||||
channelIdx = reader.readByte();
|
||||
pathLen = reader.readByte();
|
||||
txtType = reader.readByte();
|
||||
final hasPath = (flags & 0x01) != 0;
|
||||
if (hasPath && pathLen > 0) {
|
||||
reader.rewind(); // Rewind to read path length again for pathBytes
|
||||
pathBytes = reader.readBytes(pathLen);
|
||||
|
||||
Reference in New Issue
Block a user