Browse Source

Homogenize board names and build flags

fastled
Xose Pérez 7 years ago
parent
commit
97f3557e3f
3 changed files with 72 additions and 72 deletions
  1. +27
    -27
      code/espurna/config/hardware.h
  2. +10
    -10
      code/ota_flash.sh
  3. +35
    -35
      code/platformio.ini

+ 27
- 27
code/espurna/config/hardware.h View File

@ -95,7 +95,7 @@
#elif defined(ITEAD_SONOFF_BASIC) #elif defined(ITEAD_SONOFF_BASIC)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_BASIC" #define DEVICE "SONOFF_BASIC"
// Buttons // Buttons
@ -114,7 +114,7 @@
#elif defined(ITEAD_SONOFF_RF) #elif defined(ITEAD_SONOFF_RF)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_RF" #define DEVICE "SONOFF_RF"
// Buttons // Buttons
@ -133,7 +133,7 @@
#elif defined(ITEAD_SONOFF_TH) #elif defined(ITEAD_SONOFF_TH)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_TH" #define DEVICE "SONOFF_TH"
// Buttons // Buttons
@ -152,7 +152,7 @@
#elif defined(ITEAD_SONOFF_SV) #elif defined(ITEAD_SONOFF_SV)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_SV" #define DEVICE "SONOFF_SV"
// Buttons // Buttons
@ -171,7 +171,7 @@
#elif defined(ITEAD_SLAMPHER) #elif defined(ITEAD_SLAMPHER)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SLAMPHER" #define DEVICE "SLAMPHER"
// Buttons // Buttons
@ -190,7 +190,7 @@
#elif defined(ITEAD_S20) #elif defined(ITEAD_S20)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "S20" #define DEVICE "S20"
// Buttons // Buttons
@ -209,7 +209,7 @@
#elif defined(ITEAD_SONOFF_TOUCH) #elif defined(ITEAD_SONOFF_TOUCH)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_TOUCH" #define DEVICE "SONOFF_TOUCH"
// Buttons // Buttons
@ -228,7 +228,7 @@
#elif defined(ITEAD_SONOFF_POW) #elif defined(ITEAD_SONOFF_POW)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_POW" #define DEVICE "SONOFF_POW"
// Buttons // Buttons
@ -253,7 +253,7 @@
#elif defined(ITEAD_SONOFF_DUAL) #elif defined(ITEAD_SONOFF_DUAL)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_DUAL" #define DEVICE "SONOFF_DUAL"
#define SERIAL_BAUDRATE 19230 #define SERIAL_BAUDRATE 19230
#define RELAY_PROVIDER RELAY_PROVIDER_DUAL #define RELAY_PROVIDER RELAY_PROVIDER_DUAL
@ -271,7 +271,7 @@
#elif defined(ITEAD_SONOFF_4CH) #elif defined(ITEAD_SONOFF_4CH)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_4CH" #define DEVICE "SONOFF_4CH"
// Buttons // Buttons
@ -308,7 +308,7 @@
#elif defined(ITEAD_SONOFF_4CH_PRO) #elif defined(ITEAD_SONOFF_4CH_PRO)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_4CH_PRO" #define DEVICE "SONOFF_4CH_PRO"
// Buttons // Buttons
@ -354,7 +354,7 @@
// without problem. // without problem.
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "1CH_INCHING" #define DEVICE "1CH_INCHING"
// Buttons // Buttons
@ -373,7 +373,7 @@
#elif defined(ITEAD_MOTOR) #elif defined(ITEAD_MOTOR)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "MOTOR" #define DEVICE "MOTOR"
// Buttons // Buttons
@ -389,11 +389,11 @@
#define LED1_PIN 13 #define LED1_PIN 13
#define LED1_PIN_INVERSE 1 #define LED1_PIN_INVERSE 1
#elif defined(ITEAD_BN_SZ01)
#elif defined(ITEAD_BNSZ01)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define DEVICE "BN-SZ01"
#define MANUFACTURER "ITEAD"
#define DEVICE "BNSZ01"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
#define DUMMY_RELAY_COUNT 1 #define DUMMY_RELAY_COUNT 1
@ -409,7 +409,7 @@
#elif defined(ITEAD_SONOFF_RFBRIDGE) #elif defined(ITEAD_SONOFF_RFBRIDGE)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_RFBRIDGE" #define DEVICE "SONOFF_RFBRIDGE"
#define SERIAL_BAUDRATE 19200 #define SERIAL_BAUDRATE 19200
#define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE #define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE
@ -429,7 +429,7 @@
#elif defined(ITEAD_SONOFF_B1) #elif defined(ITEAD_SONOFF_B1)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_B1" #define DEVICE "SONOFF_B1"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192 #define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192
@ -442,7 +442,7 @@
#elif defined(ITEAD_SONOFF_LED) #elif defined(ITEAD_SONOFF_LED)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_LED" #define DEVICE "SONOFF_LED"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
@ -462,7 +462,7 @@
#elif defined(ITEAD_SONOFF_T1_1CH) #elif defined(ITEAD_SONOFF_T1_1CH)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_T1_1CH" #define DEVICE "SONOFF_T1_1CH"
// Buttons // Buttons
@ -481,7 +481,7 @@
#elif defined(ITEAD_SONOFF_T1_2CH) #elif defined(ITEAD_SONOFF_T1_2CH)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_T1_2CH" #define DEVICE "SONOFF_T1_2CH"
// Buttons // Buttons
@ -508,7 +508,7 @@
#elif defined(ITEAD_SONOFF_T1_3CH) #elif defined(ITEAD_SONOFF_T1_3CH)
// Info // Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_T1_3CH" #define DEVICE "SONOFF_T1_3CH"
// Buttons // Buttons
@ -598,7 +598,7 @@
#elif defined(AITHINKER_AI_LIGHT) #elif defined(AITHINKER_AI_LIGHT)
// Info // Info
#define MANUFACTURER "AI_THINKER"
#define MANUFACTURER "AITHINKER"
#define DEVICE "AI_LIGHT" #define DEVICE "AI_LIGHT"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192 #define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192
@ -615,7 +615,7 @@
#elif defined(MAGICHOME_LED_CONTROLLER) #elif defined(MAGICHOME_LED_CONTROLLER)
// Info // Info
#define MANUFACTURER "MAGIC_HOME"
#define MANUFACTURER "MAGICHOME"
#define DEVICE "LED_CONTROLLER" #define DEVICE "LED_CONTROLLER"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
@ -674,7 +674,7 @@
#elif defined(JANGOE_WIFI_RELAY_NC) #elif defined(JANGOE_WIFI_RELAY_NC)
// Info // Info
#define MANUFACTURER "JAN_GOEDEKE"
#define MANUFACTURER "JANGOE"
#define DEVICE "WIFI_RELAY_NC" #define DEVICE "WIFI_RELAY_NC"
// Buttons // Buttons
@ -697,7 +697,7 @@
#elif defined(JANGOE_WIFI_RELAY_NO) #elif defined(JANGOE_WIFI_RELAY_NO)
// Info // Info
#define MANUFACTURER "JAN_GOEDEKE"
#define MANUFACTURER "JANGOE"
#define DEVICE "WIFI_RELAY_NO" #define DEVICE "WIFI_RELAY_NO"
// Buttons // Buttons
@ -726,7 +726,7 @@
#elif defined(JORGEGARCIA_WIFI_RELAYS) #elif defined(JORGEGARCIA_WIFI_RELAYS)
// Info // Info
#define MANUFACTURER "JORGE_GARCIA"
#define MANUFACTURER "JORGEGARCIA"
#define DEVICE "WIFI_RELAYS" #define DEVICE "WIFI_RELAYS"
// Relays // Relays


+ 10
- 10
code/ota_flash.sh View File

@ -157,7 +157,7 @@ if [ "$board" == "" ]; then
fi fi
if [ "$ip" == "" ]; then if [ "$ip" == "" ]; then
read -p "IP of the device to flash: " -e -i 192.168.1.4 ip
read -p "IP of the device to flash: " -e -i 192.168.4.1 ip
fi fi
if [ "$ip" == "" ]; then if [ "$ip" == "" ]; then
@ -176,11 +176,11 @@ fi
read -p "Environment to build: " -e -i "esp8266-1m-ota" env read -p "Environment to build: " -e -i "esp8266-1m-ota" env
echo echo
echo "IP = $ip"
echo "BOARD = $board"
echo "AUTH = $auth"
echo "FLAGS = $flags"
echo "ENV = $env"
echo "ESPURNA_IP = $ip"
echo "ESPURNA_BOARD = $board"
echo "ESPURNA_AUTH = $auth"
echo "ESPURNA_FLAGS = $flags"
echo "ESPURNA_ENV = $env"
echo echo
echo -n "Are these values corrent [y/N]: " echo -n "Are these values corrent [y/N]: "
@ -190,9 +190,9 @@ if [ "$response" != "y" ]; then
exit exit
fi fi
export IP=$ip
export BOARD=$board
export AUTH=$auth
export FLAGS=$flags
export ESPURNA_IP=$ip
export ESPURNA_BOARD=$board
export ESPURNA_AUTH=$auth
export ESPURNA_FLAGS=$flags
pio run -e $env -t upload pio run -e $env -t upload

+ 35
- 35
code/platformio.ini View File

@ -4,7 +4,7 @@ src_dir = espurna
data_dir = espurna/data data_dir = espurna/data
[common] [common]
build_flags = -g -DMQTT_MAX_PACKET_SIZE=400 ${env.FLAGS}
build_flags = -g -DMQTT_MAX_PACKET_SIZE=400 ${env.ESPURNA_FLAGS}
debug_flags = -DDEBUG_ESP_CORE -DDEBUG_ESP_SSL -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM debug_flags = -DDEBUG_ESP_CORE -DDEBUG_ESP_SSL -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM
build_flags_512k = ${common.build_flags} -Wl,-Tesp8266.flash.512k0.ld build_flags_512k = ${common.build_flags} -Wl,-Tesp8266.flash.512k0.ld
build_flags_1m = ${common.build_flags} -Wl,-Tesp8266.flash.1m0.ld build_flags_1m = ${common.build_flags} -Wl,-Tesp8266.flash.1m0.ld
@ -723,6 +723,29 @@ upload_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266 upload_flags = --auth=fibonacci --port 8266
monitor_baud = 115200 monitor_baud = 115200
[env:huacanxing-h802]
platform = espressif8266
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DHUACANXING_H802 -DDEBUG_PORT=Serial1
monitor_baud = 115200
[env:huacanxing-h802-ota]
platform = espressif8266
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DHUACANXING_H802 -DDEBUG_PORT=Serial1
upload_speed = 115200
upload_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266
monitor_baud = 115200
[env:itead-bnsz01] [env:itead-bnsz01]
platform = espressif8266 platform = espressif8266
framework = arduino framework = arduino
@ -730,7 +753,7 @@ board = esp8285
board_flash_mode = dout board_flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DITEAD_BN_SZ01
build_flags = ${common.build_flags_1m} -DITEAD_BNSZ01
monitor_baud = 115200 monitor_baud = 115200
[env:itead-bnsz01-ota] [env:itead-bnsz01-ota]
@ -740,7 +763,7 @@ board = esp8285
board_flash_mode = dout board_flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DITEAD_BN_SZ01
build_flags = ${common.build_flags_1m} -DITEAD_BNSZ01
upload_speed = 115200 upload_speed = 115200
upload_port = "192.168.4.1" upload_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266 upload_flags = --auth=fibonacci --port 8266
@ -803,10 +826,10 @@ board = esp8285
board_flash_mode = dout board_flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -D${env.BOARD}
build_flags = ${common.build_flags_1m} -D${env.ESPURNA_BOARD}
upload_speed = 115200 upload_speed = 115200
upload_port = "${env.IP}"
upload_flags = --auth=${env.AUTH} --port 8266
upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
[env:esp8266-1m-ota] [env:esp8266-1m-ota]
platform = espressif8266 platform = espressif8266
@ -815,10 +838,10 @@ board = esp01_1m
board_flash_mode = dout board_flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -D${env.BOARD}
build_flags = ${common.build_flags_1m} -D${env.ESPURNA_BOARD}
upload_speed = 115200 upload_speed = 115200
upload_port = "${env.IP}"
upload_flags = --auth=${env.AUTH} --port 8266
upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
[env:esp8266-4m-ota] [env:esp8266-4m-ota]
platform = espressif8266 platform = espressif8266
@ -827,30 +850,7 @@ board = esp12e
board_flash_mode = dout board_flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags} -D${env.BOARD}
build_flags = ${common.build_flags} -D${env.ESPURNA_BOARD}
upload_speed = 115200 upload_speed = 115200
upload_port = "${env.IP}"
upload_flags = --auth=${env.AUTH} --port 8266
[env:huacanxing-h802]
platform = espressif8266
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DHUACANXING_H802 -DDEBUG_PORT=Serial1
monitor_baud = 115200
[env:huacanxing-h802-ota]
platform = espressif8266
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DHUACANXING_H802 -DDEBUG_PORT=Serial1
upload_speed = 115200
upload_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266
monitor_baud = 115200
upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266

Loading…
Cancel
Save