Skip to content

Commit

Permalink
add small delay after sending speed command to ears
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Aug 24, 2024
1 parent 08533e5 commit 90129a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Backend/move_lists.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ Future<void> runAction(BaseAction action, BaseStatefulDevice device) async {
EarSpeed earSpeed = HiveProxy.getOrDefault(settings, earMoveSpeed, defaultValue: earMoveSpeedDefault);
BluetoothMessage speedMsg = BluetoothMessage(message: earSpeed.command, device: device, priority: Priority.normal, type: CommandType.move, responseMSG: earSpeed.command, timestamp: DateTime.now());
device.commandQueue.addCommand(speedMsg);
BluetoothMessage delayMessage = BluetoothMessage(delay: 1, device: device, priority: Priority.normal, type: CommandType.move, message: '', timestamp: DateTime.now());
device.commandQueue.addCommand(delayMessage);
for (int i = 0; i < action.commandMoves.length; i++) {
Object element = action.commandMoves[i];
if (element is Move) {
Expand Down

0 comments on commit 90129a1

Please sign in to comment.