diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 907a292a..e6879ffb 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -2331,7 +2331,9 @@ // Relays #define RELAY1_PIN 0 - #define RELAY1_TYPE RELAY_TYPE_NORMAL + #ifndef RELAY1_TYPE + #define RELAY1_TYPE RELAY_TYPE_NORMAL // See #1504 and #1554 + #endif // LEDs #define LED1_PIN 2 diff --git a/code/platformio.ini b/code/platformio.ini index 1bf9c6b6..a3eb8548 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -2541,6 +2541,17 @@ build_flags = ${common.build_flags_1m0m} -DGENERIC_ESP01S_RELAY_V40 monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} +[env:generic-esp01s-relay-40-inv] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_1m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_1m0m} -DGENERIC_ESP01S_RELAY_V40 -DRELAY1_TYPE=1 +monitor_speed = ${common.monitor_speed} +extra_scripts = ${common.extra_scripts} + [env:generic-esp01s-relay-40-ota] platform = ${common.platform} framework = ${common.framework} @@ -2554,6 +2565,19 @@ upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} extra_scripts = ${common.extra_scripts} +[env:generic-esp01s-relay-40-inv-ota] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_1m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_1m0m} -DGENERIC_ESP01S_RELAY_V40 -DRELAY1_TYPE=1 +upload_speed = ${common.upload_speed} +upload_port = ${common.upload_port} +upload_flags = ${common.upload_flags} +extra_scripts = ${common.extra_scripts} + [env:generic-esp01s-rgbled-10] platform = ${common.platform} framework = ${common.framework}