Page 1 of 1

Issue with Blockly script

Posted: Tuesday 14 August 2018 22:17
by Prutsium
Hi there,

I want to switch the IR filter from my camera with a Blockly based on Sunset and Sunrise.
Made a small script and activating this script manually works good so i assume somehow the Blockly is something wrong.

Image

This should call 1 of the 2 scripts irOn or irOff and as said when i run these scripts manually no problem but Blockly doesn't want to work somehow.

Could anybody guide me what i do wrong?

Re: Issue with Blockly script

Posted: Tuesday 14 August 2018 22:43
by blauwebuis
Search for problem with Blockly's IF statement on the board. It doesn't work properly.

Re: Issue with Blockly script

Posted: Tuesday 14 August 2018 23:15
by StanHD
The "after sunset and before sunrise" should be:- "after sunset OR before sunrise".
This is due to the midnight (00:00) threshold that resets the day.

I have many blocklys with multiple "if" and "else if" statements all working correctly once you understand how they work.

Re: Issue with Blockly script

Posted: Thursday 16 August 2018 8:41
by Prutsium
StanHD wrote:
Tuesday 14 August 2018 23:15
The "after sunset and before sunrise" should be:- "after sunset OR before sunrise".
This is due to the midnight (00:00) threshold that resets the day.

I have many blocklys with multiple "if" and "else if" statements all working correctly once you understand how they work.
Thanks will try that one.

Re: Issue with Blockly script

Posted: Friday 17 August 2018 9:22
by Prutsium
StanHD wrote:
Tuesday 14 August 2018 23:15
The "after sunset and before sunrise" should be:- "after sunset OR before sunrise".
This is due to the midnight (00:00) threshold that resets the day.

I have many blocklys with multiple "if" and "else if" statements all working correctly once you understand how they work.
Confirmed that it works. Thanks!!!

Re: Issue with Blockly script

Posted: Friday 17 August 2018 13:45
by StanHD
Good news, glad it works :)