Skip to content

Commit

Permalink
Connect speed slider to joystick timer
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Mar 3, 2024
1 parent a54fb42 commit 0e472e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Frontend/pages/DirectGearControl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class _JoystickState extends ConsumerState<DirectGearControl> {
double y = 0;
double direction = 0;
double magnitude = 0;
double speed = 50;
double speed = 25;
EasingType easingType = EasingType.linear;
Set<DeviceType> deviceTypes = DeviceType.values.toSet();

Expand Down Expand Up @@ -148,7 +148,7 @@ class _JoystickState extends ConsumerState<DirectGearControl> {
});
SendMove();
},
period: const Duration(milliseconds: 500),
period: Duration(milliseconds: (speed * 20).toInt(),
),
),
],
Expand Down

0 comments on commit 0e472e2

Please sign in to comment.