mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-08-07 09:12:57 +02:00
fix(console): multi-byte hops in change_path parser and path display
The console treated 2-/3-byte hops as 1-byte: - change_path "<name>" d103 5e34 (space-separated) was joined into continuous hex with hash_size=1, producing four 1-byte hops instead of two 2-byte ones. - path <name> always rendered 1-byte hops because it decoded the hash-size mode from upper bits of out_path_len. In meshcore 2.x the library already masks out_path_len to the hop count and exposes the mode separately in out_path_hash_mode. Parser now splits on commas, whitespace, or arrow separators and requires consistent hop length. Display reads out_path_hash_mode and also shows the byte size, e.g. "D103,5E34 (2 hops, 2B)".
This commit is contained in:
@@ -2753,7 +2753,7 @@ class DeviceManager:
|
||||
return {'success': True, 'data': {
|
||||
'out_path': contact.get('out_path', ''),
|
||||
'out_path_len': contact.get('out_path_len', -1),
|
||||
'out_path_hash_len': contact.get('out_path_hash_len', 0),
|
||||
'out_path_hash_mode': contact.get('out_path_hash_mode', 0),
|
||||
}}
|
||||
|
||||
def discover_path(self, name_or_key: str) -> Dict:
|
||||
|
||||
Reference in New Issue
Block a user