Skip to content

Commit

Permalink
Correct that only 2 relais states are set (only 8 bit available).
Browse files Browse the repository at this point in the history
  • Loading branch information
breaker27 committed Sep 23, 2022
1 parent d493658 commit 0b2492c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firmware/shc_powerswitch/shc_powerswitch.c
Expand Up @@ -167,7 +167,7 @@ void send_gpio_digitalporttimeout_status(void)
switch_state_physical[i] ? switch_on_delay_counter[i] : switch_off_delay_counter[i]);

// set relais state with offset 6
if (i < 3)
if (i < 2)
msg_gpio_digitalporttimeout_set_on(i + 6, relais_state[i]);
}

Expand Down Expand Up @@ -495,7 +495,7 @@ void process_request(MessageTypeEnum messagetype, uint32_t messagegroupid, uint3
switch_state_physical[i] ? switch_on_delay_counter[i] : switch_off_delay_counter[i]);

// set relais state with offset 6
if (i < 3)
if (i < 2)
msg_gpio_digitalporttimeout_set_on(i + 6, relais_state[i]);
}

Expand Down

0 comments on commit 0b2492c

Please sign in to comment.