Blink:stop() resets blink.loop to false

,

I've noticed that stopping and re-starting a blinker retains the on/off durations you have set—but loses its loop property, which returns to the default of false.

According to the documentation, blinker:stop(): Stops a blinker if it’s running. Its state will reset to its default value.

However, that doesn't seem to actually be the case, as cycles, onDuration , and offDuration all retain their set values. I'll file a bug on this so we can get this situation cleaned up!

1 Like

Cool! (It seems ideal to me if you didn't need to re-set all those values each time you re-start.)

Also, it wasn't clear to me in those docs what "state" referred to: I just assumed it meant the true/false blink state, not all of its other properties.

I agree, I wasn't sure about what state meant either, I'll make sure the documentation gets cleared up.

I think you're right about not wanting to reset loop as well, I'm just a little bit worried about breaking old code that may rely on the current behavior so we'll have to take that into account.

1 Like

I've got a fix ready for this now, it should make it into the next SDK release (just missed the 1.12 release, unfortunately!)

1 Like

Great!

Lady Macbeth
Captain Ahab
Indiana Jones
The Grinch
Scarlett O'Hara
Sam Spade
T'Challa
Walter White
Ellen Ripley
John McClane
Ebenezer Scrooge
Jane Tennison
Sarah Connor
James Moriarty
Number Six
Jane Marple
Montgomery Burns
Hikaru Sulu
Mr. Bean
Lando Calrissian