diff --git a/code/espurna/relay.cpp b/code/espurna/relay.cpp index eca66fc5..ab6f1169 100644 --- a/code/espurna/relay.cpp +++ b/code/espurna/relay.cpp @@ -1473,15 +1473,13 @@ void _relaySetupAdhoc() { for (unsigned char id = 0; id < RelaysMax; ++id) { const auto pin = _relayPin(id); - #if (RELAY_PROVIDER == RELAY_PROVIDER_RELAY) || (RELAY_PROVIDER == RELAY_PROVIDER_LIGHT) - if (!gpioValid(pin)) { - break; - } - #elif (RELAY_PROVIDER == RELAY_PROVIDER_MCP23S08) + #if (RELAY_PROVIDER == RELAY_PROVIDER_MCP23S08) if (!mcpGpioValid(pin)) { + #else + if (!gpioValid(pin)) { + #endif break; } - #endif _relays.emplace_back( std::make_unique(_relayPin(id)),