Change default config behavior

Do not force values but print error message a compile time
This commit is contained in:
Mathieu Maret 2016-04-10 00:08:37 +02:00
parent 1bbd52a234
commit ae6e03d67e
2 changed files with 11 additions and 10 deletions

View File

@ -13,15 +13,16 @@
#define CONFIG_SAMPLING_PERIODE_MS 60000
#endif
#ifndef CONFIG_BMP180_SDA
#define CONFIG_BMP180_SDA 12
#endif
#ifndef CONFIG_BMP180_SLC
#define CONFIG_BMP180_SLC 14
#if defined(CONFIG_ENABLE_BMP180) && !defined(CONFIG_BMP180_SDA)
#error "When enabling BMP180, you should configure SDA pin"
#endif
#ifndef CONFIG_DHT_PIN
#define CONFIG_DHT_PIN 2
#if defined(CONFIG_ENABLE_BMP180) && !defined(CONFIG_BMP180_SCL)
#error "When enabling BMP180, you should configure SLC pin"
#endif
#if defined(CONFIG_ENABLE_DHT) && !defined(CONFIG_DHT_PIN)
#error "When enabling DHT, you should configure SDA pin"
#endif
#ifndef CONFIG_SSID_NAME
@ -29,7 +30,7 @@
#endif
#ifndef CONFIG_MQTT_CONTROLLED_GPIO
#define CONFIG_MQTT_CONTROLLED_GPIO {2, 13}
#define CONFIG_MQTT_CONTROLLED_GPIO {}
#endif
#ifndef CONFIG_EEPROM_SIZE

View File

@ -13,7 +13,7 @@
#define CONFIG_BMP180_SCL 14
#define CONFIG_ENABLE_DHT
#define CONFIG_DHT_PIN 2
#define CONFIG_DHT_PIN 5
// Enable light sleep to save some power (http://bbs.espressif.com/viewtopic.php?f=6&t=133&p=485&hilit=sleep+modem#p485)
// Switch off internal LED
@ -38,7 +38,7 @@
// GPIO that can be set or get by mqtt
// Should have less value than MAXSUBSCRIPTIONS
//#define CONFIG_MQTT_CONTROLLED_GPIO {2, 13}
#define CONFIG_MQTT_CONTROLLED_GPIO {2,13}
// EEPROM SIZE