Merge pull request #11104 from barbudor/pr_mcp230xx_switch_back

allows switch pinmode from output to input
This commit is contained in:
Theo Arends 2021-02-24 10:27:37 +01:00 committed by GitHub
commit 1d9d982b6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 ++) {