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

Bug in relay.ino? #424

Closed
xoseperez opened this issue Jan 15, 2018 · 2 comments
Closed

Bug in relay.ino? #424

xoseperez opened this issue Jan 15, 2018 · 2 comments
Assignees
Milestone

Comments

@xoseperez
Copy link
Owner

Originally reported by: P.B. (Bitbucket: PieBru, GitHub: PieBru)


Hi, in struct relay_t, pulse and pulse_ms should be moved after delay_off, otherwise the _relays.push_back() - i.e. line 700 - doesn't match the struct definition.

#!arduino
_relays.push_back((relay_t) { RELAY1_PIN, RELAY1_TYPE, RELAY1_RESET_PIN, RELAY1_DELAY_ON, RELAY1_DELAY_OFF });

IMO the struct should look:

#!arduino
    ...
    unsigned char reset_pin;    // GPIO to reset the relay if RELAY_TYPE_LATCHED
    unsigned long delay_on;     // Delay to turn relay ON
    unsigned long delay_off;    // Delay to turn relay OFF
    unsigned char pulse;        // RELAY_PULSE_NONE, RELAY_PULSE_OFF or RELAY_PULSE_ON
    unsigned long pulse_ms;     // Pulse length in millis
    ...

Otherwise all the _relays.push_back() should be changed.

Piero

@xoseperez
Copy link
Owner Author

You are right. Fixed in dev (commit f38e4fc).

@xoseperez
Copy link
Owner Author

Will be released with 1.12.2

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

No branches or pull requests

1 participant