From a20de2ce426f97c8eacca2107d70cd664add9dc3 Mon Sep 17 00:00:00 2001 From: Lazar Obradovic Date: Thu, 8 Mar 2018 20:06:31 +0100 Subject: [PATCH 1/3] Add dummy image that would compile in a lot of functionality. --- .travis.yml | 2 +- code/espurna/config/hardware.h | 68 ++++++++++++++++++++++++++++++++++ code/platformio.ini | 13 +++++++ 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cef15971..47cd79aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ install: - pip install -U platformio - cd code ; npm install --only=dev ; cd .. script: -- cd code ; ./build.sh; cd .. +- cd code && ./build.sh travis01 && cd .. before_deploy: - mv firmware/*/espurna-*.bin firmware/ deploy: diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index c7c4743a..eec42311 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1532,6 +1532,74 @@ #define TERMINAL_SUPPORT 0 #define DEBUG_SERIAL_SUPPORT 0 +#elif defined(TRAVIS01) + + // Info + #define MANUFACTURER "TravisCI" + #define DEVICE "Virtual board 01" + + // Some buttons + #define BUTTON1_PIN 0 + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + #define BUTTON1_RELAY 1 + + // Some relays + #define RELAY1_PIN 1 + #define RELAY1_TYPE RELAY_TYPE_NORMAL + + // Some LEDs + #define LED1_PIN 2 + #define LED1_PIN_INVERSE 1 + + // A bit of I2C + #define I2C_SDA_PIN 3 + #define I2C_SCL_PIN 4 + // 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. + // We got silk sensor, velvet sensor, naugahyde sensor. We even got horse sensor, dog sensor, chicken sensor. + // C'mon, you want sensor, come on in sensor lovers! + // If we don’t got it, you don't want it! + #define BH1750_SUPPORT 1 + #define BMX280_SUPPORT 1 + #define SHT3X_I2C_SUPPORT 1 + #define EMON_ADC121_SUPPORT 1 + #define EMON_ADS1X15_SUPPORT 1 + #define SHT3X_I2C_SUPPORT 1 + #define SI7021_SUPPORT 1 + + + // A bit of lights. + #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT + #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER + #define DUMMY_RELAY_COUNT 1 + #define LIGHT_CHANNELS 1 + #define LIGHT_CH1_PIN 5 + #define LIGHT_CH1_INVERSE 0 + + // A bit of HLW8012 + #ifndef HLW8012_SUPPORT + #define HLW8012_SUPPORT 1 + #endif + #define HLW8012_SEL_PIN 6 + #define HLW8012_CF1_PIN 7 + #define HLW8012_CF_PIN 8 + + // A bit of Dallas + #ifndef DALLAS_SUPPORT + #define DALLAS_SUPPORT 1 + #endif + #define DALLAS_PIN 9 + + // And some ECH1560 + #ifndef ECH1560_SUPPORT + #define ECH1560_SUPPORT 1 + #endif + #define ECH1560_CLK_PIN 10 + #define ECH1560_MISO_PIN 11 + #define ECH1560_INVERTED 12 + #endif // ----------------------------------------------------------------------------- diff --git a/code/platformio.ini b/code/platformio.ini index 968a33b2..5bf247b7 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -1526,3 +1526,16 @@ upload_speed = 115200 upload_port = "${env.ESPURNA_IP}" upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266 extra_scripts = ${common.extra_scripts} + +# ------------------------------------------------------------------------------ +# SPECIAL BUILDS - DO. NOT. USE. ever --- +# ------------------------------------------------------------------------------ +[env:travis01] +platform = ${common.platform} +framework = arduino +board = esp12e +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags} -DTRAVIS01 +monitor_baud = 115200 +extra_scripts = ${common.extra_scripts} From 2355fe0dd942a1f1c075b0e1b920f332a61d72ad Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Fri, 9 Mar 2018 01:25:17 +0300 Subject: [PATCH 2/3] Prune unused SparkFunBME280.h --- code/espurna/config/sensors.h | 1 - 1 file changed, 1 deletion(-) diff --git a/code/espurna/config/sensors.h b/code/espurna/config/sensors.h index 28824ee8..c22003f1 100644 --- a/code/espurna/config/sensors.h +++ b/code/espurna/config/sensors.h @@ -626,7 +626,6 @@ PROGMEM const char* const magnitude_units[] = { #endif #if BMX280_SUPPORT - #include #include "../sensors/BMX280Sensor.h" #endif From 9433e5cc78d5f6f6339681db10626f89ee652bfc Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Fri, 9 Mar 2018 01:40:42 +0300 Subject: [PATCH 3/3] Not yet implemented settings i2c scan --- code/espurna/settings.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/espurna/settings.ino b/code/espurna/settings.ino index b535c590..c114e7ba 100644 --- a/code/espurna/settings.ino +++ b/code/espurna/settings.ino @@ -222,7 +222,7 @@ void _settingsInitCommands() { #if I2C_SUPPORT settingsRegisterCommand(F("I2C.SCAN"), [](Embedis* e) { - _settingsI2CScanCommand(); + i2cScan(); DEBUG_MSG_P(PSTR("+OK\n")); });