Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two rules for same input cause wrong output ... #164

Open
SandyWalsh opened this issue Oct 4, 2013 · 5 comments
Open

Two rules for same input cause wrong output ... #164

SandyWalsh opened this issue Oct 4, 2013 · 5 comments

Comments

@SandyWalsh
Copy link

I have reed switch on Input 1 (+5v & GND).
Configured to be "ON" when High, retrigger in 3s.

I have two outputs configured to fire when the Input in ON:

When IN1 is OFF wait 1 second then turn OUT1 on for 1 sec
When IN1 is ON wait 1 second then turn OUT2 on for 1 sec

I would expect Out1 OR Out 2 to repeat every 3 sec depending on the state of the input switch.

However, when the input is ON, I see output 2 coming on for 1s every 3s AND output 1 coming on for 1s.

Seems output rule 2 is triggering output rule 1.

I have a screen shot of the program if you need it.

(I'll start looking at the code to see if I can spot the offending line)

@SandyWalsh
Copy link
Author

I think the problem is here:
https://github.com/Aylr/theHB/blob/master/Hauntbox_Firmware/Hauntbox_Firmware.ino#L958

It's checking the row and not the input for that row.

So, row 2 will always check input 2
row 3 will always check input 3, etc

It would be curious to see how it behaves with more than 6 rows. :)

@Aylr
Copy link
Owner

Aylr commented Oct 4, 2013

Can you post the program.txt & settings.txt files from your hauntbox? You can easily grab them at hauntbox.local/program.txt & .../settings.txt

I'd love to try to re-create the bug.

@SandyWalsh
Copy link
Author

Sure thing:

Settings:
1,1,1,1,1,1,1,1,1,1,1,1;mag switch,,,,,;UV,light,strobe,sound,air horn,zombie;103,103,103,103,103,103;10000,100,100,100,100,100;

Program:
1,1;1,1;0,1;0,0;1,2;1,1;2,2;1000,5000;

(it's a modification of the default program)

Are there any docs on these formats?

@Aylr
Copy link
Owner

Aylr commented Oct 4, 2013

Give me a few minutes to set up one just like this...

@Aylr
Copy link
Owner

Aylr commented Oct 4, 2013

Interesting. Something is locking up. When you set the output type as "while input is triggered" the issue goes away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants