Compare commits

...

6 Commits

Author SHA1 Message Date
Jonas Bark
69afc698dc less messages when calibrating 2026-01-30 18:06:13 +01:00
Jonas Bark
babe564f3a fix action assignment 2026-01-30 17:46:58 +01:00
jonasbark
c10666be80 Update Windows Store version to 4.6.2 2026-01-30 12:29:19 +01:00
jonasbark
67ad3fb8c5 Change YouTube video link in README.md
Updated YouTube video link in README.
2026-01-30 10:41:51 +01:00
Jonas Bark
586b17c2d2 version++ 2026-01-29 16:22:46 +01:00
Jonas Bark
4909a1a47f fix issue when duplicating keymap 2026-01-29 16:22:32 +01:00
6 changed files with 14 additions and 13 deletions

View File

@@ -11,7 +11,7 @@ With BikeControl you can **control your favorite trainer app** using your Zwift
- control music on your device
- more? If you can do it via keyboard, mouse, or touch, you can do it with BikeControl
[![Youtube Video](https://github.com/user-attachments/assets/1bd49f4c-e920-4ad1-ba68-99c7bc9bd1ab)](https://www.youtube.com/watch?v=rK6Zthcl2UU)
[![Youtube Video](https://github.com/user-attachments/assets/14a45ca1-e31b-4fbd-8d03-95aa60470405)](https://youtu.be/0r3LO5lFlyc)
## Download

View File

@@ -1 +1 @@
4.4.1
4.6.2

View File

@@ -10,7 +10,6 @@ import 'package:bike_control/widgets/ui/beta_pill.dart';
import 'package:bike_control/widgets/ui/device_info.dart';
import 'package:bike_control/widgets/ui/small_progress_indicator.dart';
import 'package:flutter/foundation.dart';
import 'package:prop/prop.dart';
import 'package:sensors_plus/sensors_plus.dart';
import 'package:shadcn_flutter/shadcn_flutter.dart';
@@ -120,9 +119,9 @@ class GyroscopeSteering extends BaseDevice {
if (_estimator.stillTimeSec >= 0.6) {
_estimator.calibrate(seedBiasZRadPerSec: _estimator.biasZRadPerSec);
_isCalibrated = true;
actionStreamInternal.add(
/*actionStreamInternal.add(
AlertNotification(LogLevel.LOGLEVEL_INFO, 'Calibration complete.'),
);
);*/
}
return;
}
@@ -246,9 +245,6 @@ class GyroscopeSteering extends BaseDevice {
_lastGyroUpdate = null;
_lastRoundedAngle = null;
_lastSteeringButton = null;
actionStreamInternal.add(
AlertNotification(LogLevel.LOGLEVEL_INFO, 'Calibrating the sensors now.'),
);
setState(() {});
},
child: Text(_isCalibrated ? 'Calibrate' : 'Calibrating...'),

View File

@@ -108,6 +108,7 @@ class Keymap {
KeyPair(
touchPosition: Offset.zero,
buttons: [button],
inGameAction: button.action,
physicalKey: null,
logicalKey: null,
isLongPress: false,

View File

@@ -247,9 +247,11 @@ class KeymapManager {
} else {
final customApp = CustomApp(profileName: newName);
final connectedDevice = core.connection.devices.firstOrNull;
final connectedDeviceButtons = IterableFlatMap(
core.connection.controllerDevices,
).flatMap((e) => e.availableButtons).toSet();
core.actionHandler.supportedApp!.keymap.keyPairs.forEachIndexed((pair, index) {
pair.buttons.filter((button) => connectedDevice?.availableButtons.contains(button) == true).forEachIndexed((
pair.buttons.filter((button) => connectedDeviceButtons.contains(button) == true).forEachIndexed((
button,
indexB,
) {
@@ -288,9 +290,11 @@ class KeymapManager {
} else {
final customApp = CustomApp(profileName: newName);
final connectedDevice = core.connection.devices.firstOrNull;
final connectedDeviceButtons = IterableFlatMap(
core.connection.controllerDevices,
).flatMap((e) => e.availableButtons).toSet();
core.actionHandler.supportedApp!.keymap.keyPairs.forEachIndexed((pair, index) {
pair.buttons.filter((button) => connectedDevice?.availableButtons.contains(button) == true).forEachIndexed((
pair.buttons.filter((button) => connectedDeviceButtons.contains(button) == true).forEachIndexed((
button,
indexB,
) {

View File

@@ -1,7 +1,7 @@
name: bike_control
description: "BikeControl - Control your virtual riding"
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 4.6.1+90
version: 4.6.2+91
environment:
sdk: ^3.9.0