mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-14 21:02:03 +10:00
expose mode 3 in UI
This commit is contained in:
@@ -2588,7 +2588,7 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
|
||||
Future<void> setPathHashMode(int mode) async {
|
||||
if (!isConnected) return;
|
||||
final clampedMode = mode.clamp(0, 2).toInt();
|
||||
final clampedMode = mode.clamp(0, 3).toInt();
|
||||
await sendFrame(buildSetPathHashModeFrame(clampedMode));
|
||||
final nextWidth = clampedMode + 1;
|
||||
if (_pathHashByteWidth != nextWidth) {
|
||||
|
||||
@@ -566,9 +566,9 @@ Uint8List buildGetStatsFrame(int statsType) {
|
||||
return Uint8List.fromList([cmdGetStats, statsType & 0xFF]);
|
||||
}
|
||||
|
||||
/// Path hash width on air: [61][0][mode], mode 0..2 → (mode+1) bytes per hop hash.
|
||||
/// Path hash width on air: [61][0][mode], mode 0..3 → (mode+1) bytes per hop hash.
|
||||
Uint8List buildSetPathHashModeFrame(int mode) {
|
||||
final m = mode.clamp(0, 2);
|
||||
final m = mode.clamp(0, 3).toInt();
|
||||
return Uint8List.fromList([cmdSetPathHashMode, 0, m]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user