Skip to content

Commit

Permalink
Homogenize board names and build flags
Browse files Browse the repository at this point in the history
  • Loading branch information
xoseperez committed Sep 6, 2017
1 parent 9640d34 commit 97f3557
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 72 deletions.
54 changes: 27 additions & 27 deletions code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
#elif defined(ITEAD_SONOFF_BASIC)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_BASIC"

// Buttons
Expand All @@ -114,7 +114,7 @@
#elif defined(ITEAD_SONOFF_RF)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_RF"

// Buttons
Expand All @@ -133,7 +133,7 @@
#elif defined(ITEAD_SONOFF_TH)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_TH"

// Buttons
Expand All @@ -152,7 +152,7 @@
#elif defined(ITEAD_SONOFF_SV)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_SV"

// Buttons
Expand All @@ -171,7 +171,7 @@
#elif defined(ITEAD_SLAMPHER)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SLAMPHER"

// Buttons
Expand All @@ -190,7 +190,7 @@
#elif defined(ITEAD_S20)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "S20"

// Buttons
Expand All @@ -209,7 +209,7 @@
#elif defined(ITEAD_SONOFF_TOUCH)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_TOUCH"

// Buttons
Expand All @@ -228,7 +228,7 @@
#elif defined(ITEAD_SONOFF_POW)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_POW"

// Buttons
Expand All @@ -253,7 +253,7 @@
#elif defined(ITEAD_SONOFF_DUAL)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_DUAL"
#define SERIAL_BAUDRATE 19230
#define RELAY_PROVIDER RELAY_PROVIDER_DUAL
Expand All @@ -271,7 +271,7 @@
#elif defined(ITEAD_SONOFF_4CH)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_4CH"

// Buttons
Expand Down Expand Up @@ -308,7 +308,7 @@
#elif defined(ITEAD_SONOFF_4CH_PRO)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_4CH_PRO"

// Buttons
Expand Down Expand Up @@ -354,7 +354,7 @@
// without problem.

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "1CH_INCHING"

// Buttons
Expand All @@ -373,7 +373,7 @@
#elif defined(ITEAD_MOTOR)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "MOTOR"

// Buttons
Expand All @@ -389,11 +389,11 @@
#define LED1_PIN 13
#define LED1_PIN_INVERSE 1

#elif defined(ITEAD_BN_SZ01)
#elif defined(ITEAD_BNSZ01)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define DEVICE "BN-SZ01"
#define MANUFACTURER "ITEAD"
#define DEVICE "BNSZ01"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
#define DUMMY_RELAY_COUNT 1
Expand All @@ -409,7 +409,7 @@
#elif defined(ITEAD_SONOFF_RFBRIDGE)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_RFBRIDGE"
#define SERIAL_BAUDRATE 19200
#define RELAY_PROVIDER RELAY_PROVIDER_RFBRIDGE
Expand All @@ -429,7 +429,7 @@
#elif defined(ITEAD_SONOFF_B1)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_B1"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192
Expand All @@ -442,7 +442,7 @@
#elif defined(ITEAD_SONOFF_LED)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_LED"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
Expand All @@ -462,7 +462,7 @@
#elif defined(ITEAD_SONOFF_T1_1CH)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_T1_1CH"

// Buttons
Expand All @@ -481,7 +481,7 @@
#elif defined(ITEAD_SONOFF_T1_2CH)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_T1_2CH"

// Buttons
Expand All @@ -508,7 +508,7 @@
#elif defined(ITEAD_SONOFF_T1_3CH)

// Info
#define MANUFACTURER "ITEAD_STUDIO"
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_T1_3CH"

// Buttons
Expand Down Expand Up @@ -598,7 +598,7 @@
#elif defined(AITHINKER_AI_LIGHT)

// Info
#define MANUFACTURER "AI_THINKER"
#define MANUFACTURER "AITHINKER"
#define DEVICE "AI_LIGHT"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192
Expand All @@ -615,7 +615,7 @@
#elif defined(MAGICHOME_LED_CONTROLLER)

// Info
#define MANUFACTURER "MAGIC_HOME"
#define MANUFACTURER "MAGICHOME"
#define DEVICE "LED_CONTROLLER"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
Expand Down Expand Up @@ -674,7 +674,7 @@
#elif defined(JANGOE_WIFI_RELAY_NC)

// Info
#define MANUFACTURER "JAN_GOEDEKE"
#define MANUFACTURER "JANGOE"
#define DEVICE "WIFI_RELAY_NC"

// Buttons
Expand All @@ -697,7 +697,7 @@
#elif defined(JANGOE_WIFI_RELAY_NO)

// Info
#define MANUFACTURER "JAN_GOEDEKE"
#define MANUFACTURER "JANGOE"
#define DEVICE "WIFI_RELAY_NO"

// Buttons
Expand Down Expand Up @@ -726,7 +726,7 @@
#elif defined(JORGEGARCIA_WIFI_RELAYS)

// Info
#define MANUFACTURER "JORGE_GARCIA"
#define MANUFACTURER "JORGEGARCIA"
#define DEVICE "WIFI_RELAYS"

// Relays
Expand Down
20 changes: 10 additions & 10 deletions code/ota_flash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ if [ "$board" == "" ]; then
fi

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

if [ "$ip" == "" ]; then
Expand All @@ -176,11 +176,11 @@ fi
read -p "Environment to build: " -e -i "esp8266-1m-ota" env

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 -n "Are these values corrent [y/N]: "
Expand All @@ -190,9 +190,9 @@ if [ "$response" != "y" ]; then
exit
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
70 changes: 35 additions & 35 deletions code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ src_dir = espurna
data_dir = espurna/data

[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
build_flags_512k = ${common.build_flags} -Wl,-Tesp8266.flash.512k0.ld
build_flags_1m = ${common.build_flags} -Wl,-Tesp8266.flash.1m0.ld
Expand Down Expand Up @@ -723,14 +723,37 @@ upload_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266
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]
platform = espressif8266
framework = arduino
board = esp8285
board_flash_mode = dout
lib_deps = ${common.lib_deps}
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

[env:itead-bnsz01-ota]
Expand All @@ -740,7 +763,7 @@ board = esp8285
board_flash_mode = dout
lib_deps = ${common.lib_deps}
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_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266
Expand Down Expand Up @@ -803,10 +826,10 @@ board = esp8285
board_flash_mode = dout
lib_deps = ${common.lib_deps}
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_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]
platform = espressif8266
Expand All @@ -815,10 +838,10 @@ board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
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_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]
platform = espressif8266
Expand All @@ -827,30 +850,7 @@ board = esp12e
board_flash_mode = dout
lib_deps = ${common.lib_deps}
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_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

0 comments on commit 97f3557

Please sign in to comment.