pi-top / pi-top-4-.NET-SDK

pi-top [4] .NET Core SDK with .NET Interactive Extensions
MIT License
49 stars 6 forks source link

Improve RoverRobot BlinkAllLights #38

Closed angusjfw closed 3 years ago

angusjfw commented 3 years ago

Currently the rover BlinkAllLights function leaves the led state toggled (off if they were on before, and on if not).

I would expect the lights to always all be left off after doing a 'blink' operation, so that is what this PR does. I also increased the default blinkCount to give 3 'blinks' from either starting state.

Arguably, they should instead just be kept in their initial state. If we prefer that, we probably need to ensure the blinkCount param is always an even number.

...Actually, I think that is better, and blinkCount should really count full 'on and off' toggles. Going to open a new PR instead of this.