mirror of https://github.com/arendst/Tasmota.git
6.2.1.19 Rename user_config.h
6.2.1.19 20181023 * Fix header file execution order by renaming user_config.h to my_user_config.h * Fix Arduino IDE compilation warning regarding e-paper library
This commit is contained in:
parent
af5a4826ee
commit
2c02532e1c
1
API.md
1
API.md
|
@ -8,6 +8,7 @@ The following table lists Callback Ids and their availability for a Driver, Sens
|
||||||
|
|
||||||
Callback Id | Bool | Version | xdrv | xsns | xnrg | Description
|
Callback Id | Bool | Version | xdrv | xsns | xnrg | Description
|
||||||
----------------------------|------|----------|------|------|------|----------------------------------
|
----------------------------|------|----------|------|------|------|----------------------------------
|
||||||
|
FUNC_SETTINGS_OVERRIDE | | 6.2.1.19 | x | | | Override start-up settings
|
||||||
FUNC_MODULE_INIT | x | 6.2.1.17 | x | | | Init module specific parameters
|
FUNC_MODULE_INIT | x | 6.2.1.17 | x | | | Init module specific parameters
|
||||||
FUNC_PRE_INIT | | | x | | x | Once GPIO have been established
|
FUNC_PRE_INIT | | | x | | x | Once GPIO have been established
|
||||||
FUNC_INIT | | | x | x | x | At end of initialisation
|
FUNC_INIT | | | x | x | x | At end of initialisation
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
name=Waveshare esp 2.9 inch e-paper display driver
|
||||||
|
version=1.0
|
||||||
|
author=Gerhard Muntz
|
||||||
|
maintainer=Gerhard Muntz
|
||||||
|
sentence=ESP8266 library for Waveshare e-paper display.
|
||||||
|
paragraph=
|
||||||
|
category=Display
|
||||||
|
url=https://github.com/gemu2015/Sonoff-Tasmota/tree/displays/lib/esp-epaper-29-ws-20171230-gemu-1.0#
|
||||||
|
architectures=esp8266
|
|
@ -1,4 +1,7 @@
|
||||||
/* 6.2.1.18 20181019
|
/* 6.2.1.19 20181023
|
||||||
|
* Fix header file execution order by renaming user_config.h to my_user_config.h
|
||||||
|
*
|
||||||
|
* 6.2.1.18 20181019
|
||||||
* Add more API callbacks and document API.md
|
* Add more API callbacks and document API.md
|
||||||
* Add support for La Crosse TX20 Anemometer (#2654, #3146)
|
* Add support for La Crosse TX20 Anemometer (#2654, #3146)
|
||||||
* Add optional HX711 scale interface to web GUI demonstrating easy GUI plug-in
|
* Add optional HX711 scale interface to web GUI demonstrating easy GUI plug-in
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
user_config.h - user specific configuration for Sonoff-Tasmota
|
my_user_config.h - user specific configuration for Sonoff-Tasmota
|
||||||
|
|
||||||
Copyright (C) 2018 Theo Arends
|
Copyright (C) 2018 Theo Arends
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _USER_CONFIG_H_
|
#ifndef _MY_USER_CONFIG_H_
|
||||||
#define _USER_CONFIG_H_
|
#define _MY_USER_CONFIG_H_
|
||||||
|
|
||||||
/*********************************************************************************************\
|
/*********************************************************************************************\
|
||||||
* This file consists of TWO sections.
|
* This file consists of TWO sections.
|
||||||
|
@ -410,4 +410,4 @@
|
||||||
#error "Select either USE_MQTT_TLS or USE_WEBSERVER as there is just not enough memory to play with"
|
#error "Select either USE_MQTT_TLS or USE_WEBSERVER as there is just not enough memory to play with"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // _USER_CONFIG_H_
|
#endif // _MY_USER_CONFIG_H_
|
|
@ -212,10 +212,13 @@ enum LightTypes {LT_BASIC, LT_PWM1, LT_PWM2, LT_PWM3, LT_PWM4, LT_PWM5, LT_PWM6,
|
||||||
enum LichtSubtypes {LST_NONE, LST_SINGLE, LST_COLDWARM, LST_RGB, LST_RGBW, LST_RGBWC};
|
enum LichtSubtypes {LST_NONE, LST_SINGLE, LST_COLDWARM, LST_RGB, LST_RGBW, LST_RGBWC};
|
||||||
enum LichtSchemes {LS_POWER, LS_WAKEUP, LS_CYCLEUP, LS_CYCLEDN, LS_RANDOM, LS_MAX};
|
enum LichtSchemes {LS_POWER, LS_WAKEUP, LS_CYCLEUP, LS_CYCLEDN, LS_RANDOM, LS_MAX};
|
||||||
|
|
||||||
enum XsnsFunctions {FUNC_MODULE_INIT, FUNC_PRE_INIT, FUNC_INIT, FUNC_LOOP, FUNC_EVERY_50_MSECOND, FUNC_EVERY_100_MSECOND, FUNC_EVERY_200_MSECOND, FUNC_EVERY_250_MSECOND, FUNC_EVERY_SECOND,
|
enum XsnsFunctions {FUNC_SETTINGS_OVERRIDE, FUNC_MODULE_INIT, FUNC_PRE_INIT, FUNC_INIT,
|
||||||
|
FUNC_LOOP, FUNC_EVERY_50_MSECOND, FUNC_EVERY_100_MSECOND, FUNC_EVERY_200_MSECOND, FUNC_EVERY_250_MSECOND, FUNC_EVERY_SECOND,
|
||||||
FUNC_PREP_BEFORE_TELEPERIOD, FUNC_JSON_APPEND, FUNC_WEB_APPEND, FUNC_SAVE_BEFORE_RESTART, FUNC_COMMAND,
|
FUNC_PREP_BEFORE_TELEPERIOD, FUNC_JSON_APPEND, FUNC_WEB_APPEND, FUNC_SAVE_BEFORE_RESTART, FUNC_COMMAND,
|
||||||
FUNC_MQTT_SUBSCRIBE, FUNC_MQTT_INIT, FUNC_MQTT_DATA, FUNC_SET_POWER, FUNC_SET_DEVICE_POWER, FUNC_SHOW_SENSOR,
|
FUNC_MQTT_SUBSCRIBE, FUNC_MQTT_INIT, FUNC_MQTT_DATA,
|
||||||
FUNC_RULES_PROCESS, FUNC_SERIAL, FUNC_FREE_MEM, FUNC_BUTTON_PRESSED, FUNC_WEB_ADD_BUTTON, FUNC_WEB_ADD_MAIN_BUTTON, FUNC_WEB_ADD_HANDLER};
|
FUNC_SET_POWER, FUNC_SET_DEVICE_POWER, FUNC_SHOW_SENSOR,
|
||||||
|
FUNC_RULES_PROCESS, FUNC_SERIAL, FUNC_FREE_MEM, FUNC_BUTTON_PRESSED,
|
||||||
|
FUNC_WEB_ADD_BUTTON, FUNC_WEB_ADD_MAIN_BUTTON, FUNC_WEB_ADD_HANDLER};
|
||||||
|
|
||||||
const uint8_t kDefaultRfCode[9] PROGMEM = { 0x21, 0x16, 0x01, 0x0E, 0x03, 0x48, 0x2E, 0x1A, 0x00 };
|
const uint8_t kDefaultRfCode[9] PROGMEM = { 0x21, 0x16, 0x01, 0x0E, 0x03, 0x48, 0x2E, 0x1A, 0x00 };
|
||||||
|
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
// Location specific includes
|
// Location specific includes
|
||||||
#include <core_version.h> // Arduino_Esp8266 version information (ARDUINO_ESP8266_RELEASE and ARDUINO_ESP8266_RELEASE_2_3_0)
|
#include <core_version.h> // Arduino_Esp8266 version information (ARDUINO_ESP8266_RELEASE and ARDUINO_ESP8266_RELEASE_2_3_0)
|
||||||
#include "sonoff_version.h" // Sonoff-Tasmota version information
|
#include "sonoff_version.h" // Sonoff-Tasmota version information
|
||||||
#include "sonoff.h" // Enumeration used in user_config.h
|
#include "sonoff.h" // Enumeration used in my_user_config.h
|
||||||
#include "user_config.h" // Fixed user configurable options
|
#include "my_user_config.h" // Fixed user configurable options
|
||||||
#ifdef USE_CONFIG_OVERRIDE
|
#ifdef USE_CONFIG_OVERRIDE
|
||||||
#include "user_config_override.h" // Configuration overrides for user_config.h
|
#include "user_config_override.h" // Configuration overrides for my_user_config.h
|
||||||
#endif
|
#endif
|
||||||
#include "sonoff_post.h" // Configuration overrides for all previous includes
|
#include "sonoff_post.h" // Configuration overrides for all previous includes
|
||||||
#include "i18n.h" // Language support configured by user_config.h
|
#include "i18n.h" // Language support configured by my_user_config.h
|
||||||
#include "sonoff_template.h" // Hardware configuration
|
#include "sonoff_template.h" // Hardware configuration
|
||||||
|
|
||||||
#ifdef ARDUINO_ESP8266_RELEASE_2_4_0
|
#ifdef ARDUINO_ESP8266_RELEASE_2_4_0
|
||||||
|
@ -2575,6 +2575,10 @@ void setup()
|
||||||
|
|
||||||
GetFeatures();
|
GetFeatures();
|
||||||
|
|
||||||
|
if (1 == RtcReboot.fast_reboot_count) { // Allow setting override only when all is well
|
||||||
|
XdrvCall(FUNC_SETTINGS_OVERRIDE);
|
||||||
|
}
|
||||||
|
|
||||||
baudrate = Settings.baudrate * 1200;
|
baudrate = Settings.baudrate * 1200;
|
||||||
seriallog_level = Settings.seriallog_level;
|
seriallog_level = Settings.seriallog_level;
|
||||||
seriallog_timer = SERIALLOG_TIMER;
|
seriallog_timer = SERIALLOG_TIMER;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
user_config_override.h - user configuration overrides user_config.h for Sonoff-Tasmota
|
user_config_override.h - user configuration overrides my_user_config.h for Sonoff-Tasmota
|
||||||
|
|
||||||
Copyright (C) 2018 Theo Arends
|
Copyright (C) 2018 Theo Arends
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
/*****************************************************************************************************\
|
/*****************************************************************************************************\
|
||||||
* USAGE:
|
* USAGE:
|
||||||
* To modify the stock configuration without changing the user_config.h file:
|
* To modify the stock configuration without changing the my_user_config.h file:
|
||||||
* (1) copy this file to "user_config_override.h" (It will be ignored by Git)
|
* (1) copy this file to "user_config_override.h" (It will be ignored by Git)
|
||||||
* (2) define your own settings below
|
* (2) define your own settings below
|
||||||
* (3) for platformio:
|
* (3) for platformio:
|
||||||
|
@ -33,12 +33,12 @@
|
||||||
* ie1 : export PLATFORMIO_BUILD_FLAGS='-DUSE_CONFIG_OVERRIDE'
|
* ie1 : export PLATFORMIO_BUILD_FLAGS='-DUSE_CONFIG_OVERRIDE'
|
||||||
* ie2 : enable in file platformio.ini "build_flags = -Wl,-Tesp8266.flash.1m0.ld -DUSE_CONFIG_OVERRIDE"
|
* ie2 : enable in file platformio.ini "build_flags = -Wl,-Tesp8266.flash.1m0.ld -DUSE_CONFIG_OVERRIDE"
|
||||||
* for Arduino IDE:
|
* for Arduino IDE:
|
||||||
* enable define USE_CONFIG_OVERRIDE in user_config.h
|
* enable define USE_CONFIG_OVERRIDE in my_user_config.h
|
||||||
******************************************************************************************************
|
******************************************************************************************************
|
||||||
* ATTENTION:
|
* ATTENTION:
|
||||||
* - Changes to SECTION1 PARAMETER defines will only override flash settings if you change define CFG_HOLDER.
|
* - Changes to SECTION1 PARAMETER defines will only override flash settings if you change define CFG_HOLDER.
|
||||||
* - Expect compiler warnings when no ifdef/undef/endif sequence is used.
|
* - Expect compiler warnings when no ifdef/undef/endif sequence is used.
|
||||||
* - You still need to update user_config.h for major define USE_MQTT_TLS.
|
* - You still need to update my_user_config.h for major define USE_MQTT_TLS.
|
||||||
* - All parameters can be persistent changed online using commands via MQTT, WebConsole or Serial.
|
* - All parameters can be persistent changed online using commands via MQTT, WebConsole or Serial.
|
||||||
\*****************************************************************************************************/
|
\*****************************************************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ void MP3PlayerInit(void) {
|
||||||
delay(1000);
|
delay(1000);
|
||||||
MP3_CMD(MP3_CMD_RESET, MP3_CMD_RESET_VALUE); // reset the player to defaults
|
MP3_CMD(MP3_CMD_RESET, MP3_CMD_RESET_VALUE); // reset the player to defaults
|
||||||
delay(3000);
|
delay(3000);
|
||||||
MP3_CMD(MP3_CMD_VOLUME, MP3_VOLUME); // after reset set volume depending on the entry in the user_config.h
|
MP3_CMD(MP3_CMD_VOLUME, MP3_VOLUME); // after reset set volume depending on the entry in the my_user_config.h
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ void MP3_CMD(uint8_t mp3cmd,uint16_t val) {
|
||||||
MP3Player->write(cmd, sizeof(cmd)); // write mp3 data array to player
|
MP3Player->write(cmd, sizeof(cmd)); // write mp3 data array to player
|
||||||
delay(1000);
|
delay(1000);
|
||||||
if (mp3cmd == MP3_CMD_RESET) {
|
if (mp3cmd == MP3_CMD_RESET) {
|
||||||
MP3_CMD(MP3_CMD_VOLUME, MP3_VOLUME); // after reset set volume depending on the entry in the user_config.h
|
MP3_CMD(MP3_CMD_VOLUME, MP3_VOLUME); // after reset set volume depending on the entry in the my_user_config.h
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,6 +215,11 @@ bool HxCommand()
|
||||||
|
|
||||||
/*********************************************************************************************/
|
/*********************************************************************************************/
|
||||||
|
|
||||||
|
long HxWeight()
|
||||||
|
{
|
||||||
|
return (hx_calibrate_step < HX_CAL_FAIL) ? hx_weight : 0;
|
||||||
|
}
|
||||||
|
|
||||||
void HxInit()
|
void HxInit()
|
||||||
{
|
{
|
||||||
hx_type = 0;
|
hx_type = 0;
|
||||||
|
|
Loading…
Reference in New Issue