Browse Source

Merge pull request #1386 from mcspr/relayconfig-dummy

Fix wrong GPIO value for dummy relay
alexa
Xose Pérez 5 years ago
committed by GitHub
parent
commit
625d523481
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      code/espurna/relay.ino

+ 3
- 1
code/espurna/relay.ino View File

@ -557,6 +557,8 @@ void _relayBoot() {
void _relayConfigure() {
for (unsigned int i=0; i<_relays.size(); i++) {
if (GPIO_NONE == _relays[i].pin) continue;
pinMode(_relays[i].pin, OUTPUT);
if (GPIO_NONE != _relays[i].reset_pin) {
pinMode(_relays[i].reset_pin, OUTPUT);
@ -1006,7 +1008,7 @@ void relaySetup() {
// No delay_on or off for these devices to easily allow having more than
// 8 channels. This behaviour will be recovered with v2.
for (unsigned char i=0; i < DUMMY_RELAY_COUNT; i++) {
_relays.push_back((relay_t) {0, RELAY_TYPE_NORMAL, 0, 0, 0});
_relays.push_back((relay_t) {GPIO_NONE, RELAY_TYPE_NORMAL, 0, 0, 0});
}
#else


Loading…
Cancel
Save