Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move travis test boards outside of hardware header #1943

Merged
merged 10 commits into from
Oct 16, 2019
11 changes: 4 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
language: python
python:
- '2.7'
sudo: false
conditions: v1
cache:
directories:
- "~/.npm"
Expand All @@ -18,18 +16,17 @@ env:
- ESPURNA_PIO_PATCH_ISSUE_1610=y
- ESPURNA_PIO_SHARED_LIBRARIES=y
script:
- cd code && ./build.sh -p && cd ..
- ./travis_script.sh
stages:
- name: Test
- name: Release
if: tag IS present AND tag =~ ^\d+\.\d+\.\d+$
jobs:
include:
- stage: Test
script: cd code && ./build.sh travis01
- script: cd code && ./build.sh travis02
- script: cd code && ./build.sh travis03
- script: cd code && ./build.sh travis04
env: BUILDER_ENV=travis-2_3_0
- env: BUILDER_ENV=travis-latest
- env: BUILDER_ENV=travis-git BUILDER_EXTRA=secure_client
- stage: Release
env: BUILDER_THREAD=0
- env: BUILDER_THREAD=1
Expand Down
53 changes: 53 additions & 0 deletions code/espurna/config/defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,31 @@
#define LED8_RELAY 8
#endif

#ifndef LED1_PIN_INVERSE
#define LED1_PIN_INVERSE 0
#endif
#ifndef LED2_PIN_INVERSE
#define LED2_PIN_INVERSE 0
#endif
#ifndef LED3_PIN_INVERSE
#define LED3_PIN_INVERSE 0
#endif
#ifndef LED4_PIN_INVERSE
#define LED4_PIN_INVERSE 0
#endif
#ifndef LED5_PIN_INVERSE
#define LED5_PIN_INVERSE 0
#endif
#ifndef LED6_PIN_INVERSE
#define LED6_PIN_INVERSE 0
#endif
#ifndef LED7_PIN_INVERSE
#define LED7_PIN_INVERSE 0
#endif
#ifndef LED8_PIN_INVERSE
#define LED8_PIN_INVERSE 0
#endif

// -----------------------------------------------------------------------------
// Digital Inputs
// -----------------------------------------------------------------------------
Expand Down Expand Up @@ -610,6 +635,34 @@
#define EVENTS8_PIN GPIO_NONE
#endif

// -----------------------------------------------------------------------------
// Lights
// -----------------------------------------------------------------------------

#ifndef LIGHT_CHANNELS
#define LIGHT_CHANNELS 0
#endif

#ifndef LIGHT_CH1_INVERSE
#define LIGHT_CH1_INVERSE 0
#endif

#ifndef LIGHT_CH2_INVERSE
#define LIGHT_CH2_INVERSE 0
#endif

#ifndef LIGHT_CH3_INVERSE
#define LIGHT_CH3_INVERSE 0
#endif

#ifndef LIGHT_CH4_INVERSE
#define LIGHT_CH4_INVERSE 0
#endif

#ifndef LIGHT_CH5_INVERSE
#define LIGHT_CH5_INVERSE 0
#endif

// -----------------------------------------------------------------------------
// General
// -----------------------------------------------------------------------------
Expand Down
15 changes: 15 additions & 0 deletions code/espurna/config/dependencies.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,18 @@
#undef TELNET_SERVER_ASYNC_BUFFERED
#define TELNET_SERVER_ASYNC_BUFFERED 1 // enable buffered telnet by default on latest Cores
#endif

#if LLMNR_SUPPORT && defined(ARDUINO_ESP8266_RELEASE_2_3_0)
#undef LLMNR_SUPPORT
#define LLMNR_SUPPORT 0
#endif

#if NETBIOS_SUPPORT && defined(ARDUINO_ESP8266_RELEASE_2_3_0)
#undef NETBIOS_SUPPORT
#define NETBIOS_SUPPORT 0
#endif

#if SSDP_SUPPORT && defined(ARDUINO_ESP8266_RELEASE_2_3_0)
#undef SSDP_SUPPORT
#define SSDP_SUPPORT 0
#endif
206 changes: 0 additions & 206 deletions code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -4010,212 +4010,6 @@

// -----------------------------------------------------------------------------

// -----------------------------------------------------------------------------
// TEST boards (do not use!!)
// -----------------------------------------------------------------------------

#elif defined(TRAVIS01)

// Info
#define MANUFACTURER "TravisCI"
#define DEVICE "Virtual board 01"

// Some buttons - pin 0
#define BUTTON1_PIN 0
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1

// Some relays - pin 1
#define RELAY1_PIN 1
#define RELAY1_TYPE RELAY_TYPE_NORMAL

// Some LEDs - pin 2
#define LED1_PIN 2
#define LED1_PIN_INVERSE 1

// 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":
// 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 AM2320_SUPPORT 1
#define BH1750_SUPPORT 1
#define BMP180_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
#define PMSX003_SUPPORT 1
#define SENSEAIR_SUPPORT 1
#define VL53L1X_SUPPORT 1
#define MAX6675_SUPPORT 1

// A bit of lights - pin 5
#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
#define ENCODER_SUPPORT 1

// A bit of HLW8012 - pins 6,7,8
#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 - pin 9
#ifndef DALLAS_SUPPORT
#define DALLAS_SUPPORT 1
#endif
#define DALLAS_PIN 9

// A bit of ECH1560 - pins 10,11, 12
#ifndef ECH1560_SUPPORT
#define ECH1560_SUPPORT 1
#endif
#define ECH1560_CLK_PIN 10
#define ECH1560_MISO_PIN 11
#define ECH1560_INVERTED 12

// MICS-2710 & MICS-5525 test
#define MICS2710_SUPPORT 1
#define MICS5525_SUPPORT 1

// MAX6675 14 11 10
#ifndef MAX6675_SUPPORT
#define MAX6675_SUPPORT 1
#endif
#define MAX6675_CS_PIN 14
#define MAX6675_SO_PIN 11
#define MAX6675_SCK_PIN 10

#elif defined(TRAVIS02)

// Relay provider dual
#define MANUFACTURER "TravisCI"
#define DEVICE "Virtual board 02"

// Some buttons - pin 0
#define BUTTON1_PIN 0
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1

// A bit of CSE7766 - pin 1
#ifndef CSE7766_SUPPORT
#define CSE7766_SUPPORT 1
#endif
#define CSE7766_PIN 1

// Relay type dual - pins 2,3
#define RELAY_PROVIDER RELAY_PROVIDER_DUAL
#define RELAY1_PIN 2
#define RELAY2_PIN 3
#define RELAY1_TYPE RELAY_TYPE_NORMAL
#define RELAY2_TYPE RELAY_TYPE_NORMAL

// IR - pin 4
#define IR_SUPPORT 1
#define IR_RX_PIN 4
#define IR_BUTTON_SET 1

// A bit of DHT - pin 5
#ifndef DHT_SUPPORT
#define DHT_SUPPORT 1
#endif
#define DHT_PIN 5

// A bit of TMP3X (analog)
#define TMP3X_SUPPORT 1

// A bit of EVENTS - pin 10
#define EVENTS_SUPPORT 1
#define EVENTS1_PIN 6

// Sonar
#define SONAR_SUPPORT 1
#define SONAR_TRIGGER 7
#define SONAR_ECHO 8

// MHZ19
#define MHZ19_SUPPORT 1
#define MHZ19_RX_PIN 9
#define MHZ19_TX_PIN 10

// PZEM004T
#define PZEM004T_SUPPORT 1
#define PZEM004T_RX_PIN 11
#define PZEM004T_TX_PIN 12

// V9261F
#define V9261F_SUPPORT 1
#define V9261F_PIN 13

// GUVAS12SD
#define GUVAS12SD_SUPPORT 1
#define GUVAS12SD_PIN 14

// Test non-default modules
#define MDNS_CLIENT_SUPPORT 1
#define NOFUSS_SUPPORT 1
#define UART_MQTT_SUPPORT 1
#define INFLUXDB_SUPPORT 1
#define IR_SUPPORT 1
#define RF_SUPPORT 1
#define OTA_MQTT_SUPPORT 1

#define RFB_DIRECT 1
#define RFB_RX_PIN 4

#elif defined(TRAVIS03)

// Relay provider light/my92XX
#define MANUFACTURER "TravisCI"
#define DEVICE "Virtual board 03"

// Some buttons - pin 0
#define BUTTON1_PIN 0
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1

// MY9231 Light - pins 1,2
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX
#define DUMMY_RELAY_COUNT 1
#define LIGHT_CHANNELS 5
#define MY92XX_MODEL MY92XX_MODEL_MY9231
#define MY92XX_CHIPS 2
#define MY92XX_DI_PIN 1
#define MY92XX_DCKI_PIN 2
#define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT
#define MY92XX_MAPPING 4, 3, 5, 0, 1

// A bit of analog,
// will not work on real life since they all share GPIO
// but it's OK to test build
#define EMON_ANALOG_SUPPORT 1
#define NTC_SUPPORT 1
#define LDR_SUPPORT 1

#define PULSEMETER_SUPPORT 1

// Test non-default modules
#define LLMNR_SUPPORT 1
#define NETBIOS_SUPPORT 1
#define SSDP_SUPPORT 1
#define RF_SUPPORT 1

#else

#error "UNSUPPORTED HARDWARE!!"
Expand Down
21 changes: 11 additions & 10 deletions code/espurna/config/sensors.h
Original file line number Diff line number Diff line change
Expand Up @@ -1198,10 +1198,12 @@
EMON_ADS1X15_SUPPORT || \
EMON_ANALOG_SUPPORT || \
EVENTS_SUPPORT || \
EZOPH_SUPPORT || \
GEIGER_SUPPORT || \
GUVAS12SD_SUPPORT || \
HLW8012_SUPPORT || \
LDR_SUPPORT || \
MAX6675_SUPPORT || \
MICS2710_SUPPORT || \
MICS5525_SUPPORT || \
MHZ19_SUPPORT || \
Expand All @@ -1218,8 +1220,7 @@
V9261F_SUPPORT || \
VEML6075_SUPPORT || \
VL53L1X_SUPPORT || \
MAX6675_SUPPORT || \
EZOPH_SUPPORT \
ADE7953_SUPPORT \
)
#endif

Expand Down Expand Up @@ -1354,10 +1355,6 @@
#include "../sensors/MAX6675Sensor.h"
#endif

#if MHZ19_SUPPORT
#include "../sensors/MHZ19Sensor.h"
#endif

#if MICS2710_SUPPORT
#include "../sensors/MICS2710Sensor.h"
#endif
Expand All @@ -1366,6 +1363,10 @@
#include "../sensors/MICS5525Sensor.h"
#endif

#if MHZ19_SUPPORT
#include "../sensors/MHZ19Sensor.h"
#endif

#if NTC_SUPPORT
#include "../sensors/NTCSensor.h"
#endif
Expand All @@ -1390,14 +1391,14 @@
#include "../sensors/PZEM004TSensor.h"
#endif

#if SI7021_SUPPORT
#include "../sensors/SI7021Sensor.h"
#endif

#if SHT3X_I2C_SUPPORT
#include "../sensors/SHT3XI2CSensor.h"
#endif

#if SI7021_SUPPORT
#include "../sensors/SI7021Sensor.h"
#endif

#if SONAR_SUPPORT
#include "../sensors/SonarSensor.h"
#endif
Expand Down
Loading