whoops; fix return value
This commit is contained in:
parent
2cb4354814
commit
a5aae32cc1
1 changed files with 9 additions and 7 deletions
|
@ -198,18 +198,20 @@ light = {
|
||||||
|
|
||||||
# light.cont() -> continuous light
|
# light.cont() -> continuous light
|
||||||
cont : func {
|
cont : func {
|
||||||
me.continuous and return;
|
if (!me.continuous) {
|
||||||
me.continuous = 1;
|
me.continuous = 1;
|
||||||
me.loopid += 1;
|
me.loopid += 1;
|
||||||
me.stateN.setBoolValue(me.lastswitch);
|
me.stateN.setBoolValue(me.lastswitch);
|
||||||
|
}
|
||||||
me;
|
me;
|
||||||
},
|
},
|
||||||
|
|
||||||
# light.blink() -> blinking light (default)
|
# light.blink() -> blinking light (default)
|
||||||
blink : func {
|
blink : func {
|
||||||
me.continuous or return;
|
if (me.continuous) {
|
||||||
me.continuous = 0;
|
me.continuous = 0;
|
||||||
me.lastswitch and me._loop_(me.loopid += 1);
|
me.lastswitch and me._loop_(me.loopid += 1);
|
||||||
|
}
|
||||||
me;
|
me;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue