allows switch pinmode from output to input

This commit is contained in:
Barbudor 2021-02-23 15:21:33 +01:00
parent 7aa679285a
commit e8e2280bb3
1 changed files with 1 additions and 1 deletions

View File

@ -645,7 +645,7 @@ bool MCP230xx_Command(void)
return serviced;
}
#ifdef USE_MCP230xx_OUTPUT
if (Settings.mcp230xx_config[pin].pinmode >= 5) {
if (Settings.mcp230xx_config[pin].pinmode >= 5 && paramcount == 2) {
uint8_t pincmd = Settings.mcp230xx_config[pin].pinmode - 5;
uint8_t relay_no = 0;
for (relay_no = 0; relay_no < mcp230xx_pincount ; relay_no ++) {