This commit is contained in:
Jonas Bark
2025-10-01 20:23:02 +02:00
parent d8e45f849a
commit cbef8fc044
4 changed files with 10 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
### 2.6.1 (2025-10-01)
### 2.6.2 (2025-10-01)
- fix a few issues with the new touch placement feature
- add a workaround for Zwift Click V2 which resets the device when button events are no longer sent
- fix issue on Android where only a "touch down" was sent, but no "touch up"
### 2.6.0 (2025-09-30)
- refactor touch placements: show touches on screen, fix misplaced coordinates - should fix #64

View File

@@ -303,10 +303,9 @@ abstract class BaseDevice {
_longPressTimer = Timer.periodic(const Duration(milliseconds: 350), (timer) async {
_performActions(buttonsClicked, true);
});
} else if (isLongPress) {
// Update currently pressed buttons
_previouslyPressedButtons = buttonsClicked.toSet();
}
// Update currently pressed buttons
_previouslyPressedButtons = buttonsClicked.toSet();
return _performActions(buttonsClicked, false);
}

View File

@@ -44,7 +44,11 @@ class AndroidActions extends BaseActions {
final point = supportedApp!.resolveTouchPosition(action: button, windowInfo: windowInfo);
if (point != Offset.zero) {
accessibilityHandler.performTouch(point.dx, point.dy, isKeyDown: isKeyDown, isKeyUp: isKeyUp);
return "Touch performed at: ${point.dx.toInt()}, ${point.dy.toInt()}";
return "Touch performed at: ${point.dx.toInt()}, ${point.dy.toInt()} -> ${isKeyDown
? "down"
: isKeyUp
? "up"
: "click"}";
}
return "No touch performed";
}

View File

@@ -1,7 +1,7 @@
name: swift_control
description: "SwiftControl - Control your virtual riding"
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 2.6.1+7
version: 2.6.2+8
environment:
sdk: ^3.7.0