Browse Source

Add new devices to migrate module and platformio ini file

rfm69
Xose Pérez 6 years ago
parent
commit
1ae9351532
4 changed files with 103 additions and 1 deletions
  1. +3
    -0
      code/espurna/config/arduino.h
  2. +6
    -1
      code/espurna/config/hardware.h
  3. +38
    -0
      code/espurna/migrate.ino
  4. +56
    -0
      code/platformio.ini

+ 3
- 0
code/espurna/config/arduino.h View File

@ -64,6 +64,9 @@
//#define EUROMATE_WIFI_STECKER_SCHUKO
//#define TONBUX_POWERSTRIP02
//#define LINGAN_SWA1
//#define HEYGO_HY02
//#define MAXCIO_WUS002S
//#define YIDIAN_XSSSA05
//--------------------------------------------------------------------------------
// Features (values below are non-default values)


+ 6
- 1
code/espurna/config/hardware.h View File

@ -1515,6 +1515,10 @@
#define RELAY8_PIN 15
#define RELAY8_TYPE RELAY_TYPE_NORMAL
// -----------------------------------------------------------------------------
// STM RELAY
// -----------------------------------------------------------------------------
#elif defined(STM_RELAY)
// Info
@ -1704,7 +1708,8 @@
// A bit of I2C - pins 3,4
#define I2C_SDA_PIN 3
#define I2C_SCL_PIN 4
// and, as they say in "From Dusk till Dawn":
// And, as they say in "From Dusk till Dawn":
// This is a sensor blow out!
// Alright, we got white sensor, black sensor, spanish sensor, yellow sensor. We got hot sensor, cold sensor.
// We got wet sensor. We got smelly sensor. We got hairy sensor, bloody sensor. We got snapping sensor.


+ 38
- 0
code/espurna/migrate.ino View File

@ -769,6 +769,44 @@ void migrate() {
setSetting("relayGPIO", 0, 5);
setSetting("relayType", 0, RELAY_TYPE_NORMAL);
#elif defined(HEYGO_HY02)
setSetting("board", 58);
setSetting("ledGPIO", 0, 0);
setSetting("ledLogic", 0, 0);
setSetting("ledGPIO", 1, 15);
setSetting("ledLogic", 1, 0);
setSetting("btnGPIO", 0, 13);
setSetting("btnRelay", 0, 0);
setSetting("relayGPIO", 0, 12);
setSetting("relayType", 0, RELAY_TYPE_NORMAL);
setSetting("selGPIO", 3);
setSetting("cf1GPIO", 14);
setSetting("cfGPIO", 5);
#elif defined(MAXCIO_WUS002S)
setSetting("board", 59);
setSetting("ledGPIO", 0, 3);
setSetting("ledLogic", 0, 0);
setSetting("btnGPIO", 0, 2);
setSetting("btnRelay", 0, 0);
setSetting("relayGPIO", 0, 13);
setSetting("relayType", 0, RELAY_TYPE_NORMAL);
setSetting("selGPIO", 12);
setSetting("cf1GPIO", 5);
setSetting("cfGPIO", 4);
#elif defined(YIDIAN_XSSSA05)
setSetting("board", 60);
setSetting("ledGPIO", 0, 4);
setSetting("ledLogic", 0, 0);
setSetting("btnGPIO", 0, 13);
setSetting("btnRelay", 0, 0);
setSetting("relayGPIO", 0, 12);
setSetting("relayType", 0, RELAY_TYPE_NORMAL);
#else
// Allow users to define new settings without migration config


+ 56
- 0
code/platformio.ini View File

@ -1546,6 +1546,62 @@ upload_flags = --auth=fibonacci --port 8266
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}
[env:tonbux-powerstrip-02]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DTONBUX_POWERSTRIP02
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}
[env:lingan-swa1]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DLINGAN_SWA1
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}
[env:heygo-hy02]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DHEYGO_HY02
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}
[env:maxcio-wus0025]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DMAXCIO_WUS002S
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}
[env:yidian-xsssa05]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DYIDIAN_XSSSA05
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}
# ------------------------------------------------------------------------------
# GENERIC OTA ENVIRONMENTS
# ------------------------------------------------------------------------------


Loading…
Cancel
Save