mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-12 11:52:07 +10:00
add HashMode Setting
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user