add HashMode Setting

This commit is contained in:
ericz
2026-05-18 19:17:53 +02:00
parent 28a5913ba3
commit 73e5b80232
2 changed files with 92 additions and 1 deletions
+8 -1
View File
@@ -2571,7 +2571,14 @@ class MeshCoreConnector extends ChangeNotifier {
Future<void> setPathHashMode(int mode) async {
if (!isConnected) return;
await sendFrame(buildSetPathHashModeFrame(mode.clamp(0, 2)));
final clampedMode = mode.clamp(0, 2).toInt();
await sendFrame(buildSetPathHashModeFrame(clampedMode));
final nextWidth = clampedMode + 1;
if (_pathHashByteWidth != nextWidth) {
_pathHashByteWidth = nextWidth;
_directRepeaters.clear();
notifyListeners();
}
}
Future<void> refreshDeviceInfo() async {