imurvai / brickcontroller2

Cross platform application for controlling Lego creations using a bluetooth gamepad.
108 stars 32 forks source link

First step starts after sequence run #102

Closed Dystopian closed 11 months ago

Dystopian commented 11 months ago

BrickController 2 3.3 from Google Play, Android 11.

Repro:

From several tests I found that motor starts rotating exactly with value from the 1st step.

As workaround one can add 0% 300ms (minimal value) as 1st step. Then motor just stops at the end of sequence.

vicocz commented 11 months ago

Hi, AFAIK sequences are internally executed using a timer with 50 ms interval. In case total duration of non-looped sequence is multiple of 50 milliseconds, there seems to be a value from the first step applied and set to a given channel.

There seems to be pretty simnple workaround: in your case choose duration of the last step 1001ms instead of 1000.

Dystopian commented 11 months ago

duration of the last step 1001ms instead of 1000

Thank you, it works :) And thanks for PR.