remove config stuff (moved to config.h)

This commit is contained in:
2019-11-09 20:31:08 +01:00
parent 68a4afdb12
commit 3d8ef27978

View File

@@ -22,49 +22,23 @@
// Implement OTA https://www.bakke.online/index.php/2017/06/02/self-updating-ota-firmware-for-esp8266/
// Refactoring sources: https://www.arduinolibraries.info/architectures/esp8266
// Refactor String usage to minimize heap pollution. https://cpp4arduino.com/2018/11/21/eight-tips-to-use-the-string-class-efficiently.html
// Chec Michael Teeuw's MQTT/SSL workaround: https://github.com/MichMich/ESP8266-AWS/blob/master/src/main.ino
#define DEVICEPREFIX "Gadget" // Should be no longer than 8(?) chars or the MQTT clientId will become too long
const int FW_VERSION = 12;
// More WDT fixing:
// https://www.sigmdel.ca/michel/program/esp8266/arduino/watchdogs_en.html
// (background: https://internetofhomethings.com/homethings/?p=396
// (background: http://iot-bits.com/esp8266/esp8266-reset-causes-rst-cause/
// Version history:
// v13: Refactored so config-settings are in config.h, move from Adafruit Neopixel to WS2812FX library
// v12: Refactored inbound commands to hook in to the modules (module_message function), completed assimilation of (never-published) Moon_Connected sketch
// v11: Simplified scheduler, back to cooperative looping
// v10: First 'production' run. MQTT over TLS, but no OTA support.
const int FW_VERSION = 13;
/*
* Compile time settings
*/
//
// Configuration settings
/
#include "config.h"
/************************* WiFi Access Point *********************************/
#define WLAN_SSID "MY_SSID"
#define WLAN_PASS "MY_WIFIPASSWD"
/*********************** Select active modules *******************************/
#define ENABLE_MQTT
//#define ENABLE_SONOFF
#define ENABLE_MOON
#ifdef ENABLE_MQTT
/*************************** MQTT settings ***********************************/
#define MQTT_SERVER "MY_MQTT_SERVER"
#define MQTT_SERVERPORT 8883 // 8883 for MQTTS
#define MQTT_USERNAME "MY_MQTT_USER"
#define MQTT_PASSWORD "MY_MQTT_PASSWD"
#define MQTT_PREFIX "iot/" // MQTT publish/subscribe will be prefixed by this (mind the trailing slash)
#endif
#ifdef ENABLE_SONOFF
/*************************** MQTT settings ***********************************/
#define SONOFF_BUTTON 0
#define SONOFF_RELAY 12
#define SONOFF_LED 13
#endif
#ifdef ENABLE_MOON
/*********************** NeoPixel Moon settings ******************************/
#define MOON_PIXEL 4 // Which GPIO pin is the NeoPixel connected to
#define MOON_PIXEL_LEDS 7 // Amount of leds in the string
#endif