Merge remote-tracking branch 'upstream/development' into mpu6050_full_output

This commit is contained in:
Philip Barclay 2019-11-29 21:10:10 +13:00
commit 8e2b78320a
7 changed files with 149 additions and 56 deletions

1
.gitignore vendored
View File

@ -14,6 +14,7 @@ firmware.map
firmware.asm firmware.asm
tasmota*.bin tasmota*.bin
tasmota*.map tasmota*.map
platformio_override.ini
## Visual Studio Code specific ###### ## Visual Studio Code specific ######
.vscode .vscode

View File

@ -7,10 +7,7 @@ install:
- platformio upgrade - platformio upgrade
- platformio update - platformio update
cache: cache: false
directories:
- .cache
- $HOME/.platformio
env: env:
- ENV=tasmota - ENV=tasmota

View File

@ -128,33 +128,39 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
### Version 7.1.0 Betty ### Version 7.1.0 Betty
- Remove update support for versions before 6.0 - Remove update support for versions before 6.0
- Remove driver xsns_12_ads1115_i2cdev replaced by xsns_12_ads1115 - Remove driver xsns_12_ads1115_i2cdev replaced by xsns_12_ads1115
- Remove most IR protocols from non dedicated IR firmware except NEC, RC5 and RC6 - Remove most IR protocols from non dedicated IR firmware except NEC, RC5 and RC6
- Change repository name from Sonoff-Tasmota to Tasmota and all code references from Sonoff to Tasmota - Change repository name from Sonoff-Tasmota to Tasmota and all code references from Sonoff to Tasmota
- Change default GUI to dark theme - Change documentation from wiki to [documentation repository](https://tasmota.github.io/docs/) by @Blakadder
- Change ArduinoSlave to TasmotaSlave - Change default GUI to dark theme
- Change IRremoteESP8266 library to v2.7.0 - Change ArduinoSlave to TasmotaSlave
- Change supported PCF8574 I2C address range to 0x20 - 0x26 allowing other I2C devices with address 0x27 to be used at the same time - Change IRremoteESP8266 library to v2.7.1
- Change supported PCF8574A I2C address range to 0x39 - 0x3F allowing other I2C devices with address 0x38 to be used at the same time - Change supported PCF8574 I2C address range to 0x20 - 0x26 allowing other I2C devices with address 0x27 to be used at the same time
- Change supported MCP230xx I2C address range to 0x20 - 0x26 allowing other I2C devices with address 0x27 to be used at the same time - Change supported PCF8574A I2C address range to 0x39 - 0x3F allowing other I2C devices with address 0x38 to be used at the same time
- Change Reset erase end address from as seen by SDK (getFlashChipSize) to full flash size (getFlashChipRealSize) - Change supported MCP230xx I2C address range to 0x20 - 0x26 allowing other I2C devices with address 0x27 to be used at the same time
- Fix better control of RGB/White when ``SetOption37`` >128, added ``Dimmer1`` and ``Dimmer2`` commands (#6714) - Change Reset erase end address from as seen by SDK (getFlashChipSize) to full flash size (getFlashChipRealSize)
- Fix random crash caused by UPNP flood - Change new Fade system much smoother, Speed now up to 40 (#6942, #3714)
- Fix Wifi instability when light is on, due to sleep=0 (#6961, #6608) - Fix better control of RGB/White when ``SetOption37`` >128, added ``Dimmer1`` and ``Dimmer2`` commands (#6714)
- Add support for Tuya battery powered devices (#6735) - Fix random crash caused by UPNP flood
- Add support for Honeywell I2C HIH series Humidity and Temperetaure sensor (#6808) - Fix check deepsleep for valid values in Settings (#6961)
- Add support for Honeywell HPMA115S0 particle concentration sensor by David Hunt (#6843) - Fix Wifi instability when light is on, due to ``Sleep 0`` (#6961, #6608)
- Add support for I2C sensor TLS2591 Light Intensity sensor (#6873) - Fix auto-power on/off when setting channel to non-zero or zero value, when ``SetOption68 1``
- Add command ``SetOption73 0/1`` to re-enable HTTP Cross-Origin Resource Sharing (CORS) now default disabled (#6767) - Fix postpone saving settings to flash until Fade is complete, avoids pause in Fade
- Add command ``SetOption74 0/1`` to enable DS18x20 internal pull-up and remove define DS18B20_INTERNAL_PULLUP (#6795) - Add support for Tuya battery powered devices (#6735)
- Add command ``SetOption75 0/1`` to switch between grouptopic (0) using fulltopic replacing %topic% or (1) is cmnd/\<grouptopic\> (#6779) - Add support for Honeywell I2C HIH series Humidity and Temperetaure sensor (#6808)
- Add command ``SetOption76 0/1`` to enable incrementing bootcount when deepsleep is enabled (#6930) - Add support for Honeywell HPMA115S0 particle concentration sensor by David Hunt (#6843)
- Add command ``I2cDriver`` for I2C driver runtime control using document I2CDEVICES.md - Add support for I2C sensor TLS2591 Light Intensity sensor (#6873)
- Add command ``TempOffset -12.6 .. 12.6`` to set global temperature sensor offset (#6958) - Add command ``SetOption73 0/1`` to re-enable HTTP Cross-Origin Resource Sharing (CORS) now default disabled (#6767)
- Add command ``WebColor19`` to control color of Module and Name (#6811) - Add command ``SetOption74 0/1`` to enable DS18x20 internal pull-up and remove define DS18B20_INTERNAL_PULLUP (#6795)
- Add command ``WifiPower 0 .. 20.5`` to set Wifi Output Power which will be default set to 17dBm - Add command ``SetOption75 0/1`` to switch between grouptopic (0) using fulltopic replacing %topic% or (1) is cmnd/\<grouptopic\> (#6779)
- Add frequency to ADE7953 energy monitor as used in Shelly 2.5 by ljakob (#6778) - Add command ``SetOption76 0/1`` to enable incrementing bootcount when deepsleep is enabled (#6930)
- Add hide Alexa objects with friendlyname starting with '$' (#6722, #6762) - Add command ``I2cDriver`` for I2C driver runtime control using document I2CDEVICES.md
- Add Zigbee command support, considered as v1.0 for full Zigbee support - Add command ``TempOffset -12.6 .. 12.6`` to set global temperature sensor offset (#6958)
- Add colorpicker to WebUI by Christian Staars (#6984) - Add command ``WebColor19`` to control color of Module and Name (#6811)
- Add command ``WifiPower 0 .. 20.5`` to set Wifi Output Power which will be default set to 17dBm
- Add frequency to ADE7953 energy monitor as used in Shelly 2.5 by ljakob (#6778)
- Add hide Alexa objects with friendlyname starting with '$' (#6722, #6762)
- Add Zigbee command support, considered as v1.0 for full Zigbee support
- Add hardware detection to be overruled with ``SetOption51`` (#6969)
- Add Colorpicker to WebUI by Christian Staars (#6984)

View File

@ -11,6 +11,7 @@
src_dir = tasmota src_dir = tasmota
build_dir = .pioenvs build_dir = .pioenvs
build_cache_dir = .cache build_cache_dir = .cache
extra_configs = platformio_override.ini
; *** Build/upload environment ; *** Build/upload environment
default_envs = default_envs =
@ -101,6 +102,8 @@ extra_scripts = pio/strip-floats.py
; Select one core set for platform and build_flags ; Select one core set for platform and build_flags
platform = ${core_2_6_1.platform} platform = ${core_2_6_1.platform}
build_flags = ${core_2_6_1.build_flags} build_flags = ${core_2_6_1.build_flags}
;platform = ${core_2_6_2.platform}
;build_flags = ${core_2_6_2.build_flags}
;platform = ${core_stage.platform} ;platform = ${core_stage.platform}
;build_flags = ${core_stage.build_flags} ;build_flags = ${core_stage.build_flags}
@ -113,7 +116,51 @@ build_flags = -D NDEBUG
[core_2_6_1] [core_2_6_1]
; *** Esp8266 core for Arduino version 2.6.1 ; *** Esp8266 core for Arduino version 2.6.1
platform = https://github.com/platformio/platform-espressif8266.git#develop platform = espressif8266@2.3.0
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Teagle.flash.1m.ld
-DBEARSSL_SSL_BASIC
; NONOSDK221
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK221
; NONOSDK22x_190313
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190313
; NONOSDK22x_190703 = 2.2.2-dev(38a443e) (Tasmota default)
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
; NONOSDK22x_191024 = 2.2.2-dev(5ab15d1)
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191024
; NONOSDK22x_191105 = 2.2.2-dev(bb83b9b)
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191105
; NONOSDK3V0 (known issues)
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3
; lwIP 1.4
; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; lwIP 2 - Low Memory
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
; lwIP 2 - Higher Bandwidth
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
; lwIP 2 - Higher Bandwidth Low Memory no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH
; lwIP 2 - Higher Bandwidth no Features (Tasmota default)
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; lwIP 2 - Higher Bandwidth IPv6 (use ONLY if you need IPv6, experimental!)
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_IPV6_HIGHER_BANDWIDTH
; VTABLES in Flash (Tasmota default)
-DVTABLES_IN_FLASH
; VTABLES in Heap
; -DVTABLES_IN_DRAM
; VTABLES in IRAM
; -DVTABLES_IN_IRAM
; enable one option set -> No exception recommended
; No exception code in firmware
-fno-exceptions
-lstdc++
; Exception code in firmware /needs much space! 90k
; -fexceptions
; -lstdc++-exc
[core_2_6_2]
; *** Esp8266 core for Arduino version 2.6.2
platform = espressif8266@2.3.1
build_flags = ${esp82xx_defaults.build_flags} build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Teagle.flash.1m.ld -Wl,-Teagle.flash.1m.ld
-DBEARSSL_SSL_BASIC -DBEARSSL_SSL_BASIC

View File

@ -0,0 +1,37 @@
; PlatformIO Project Configuration Override File
;
; Build options: build flags, source filter, extra scripting
; Upload options: custom port, speed and extra flags
; Library options: dependencies, extra library storages
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/en/stable/projectconf.html
[platformio]
; *** Build/upload environment
default_envs =
; *** Uncomment the line(s) below to select version(s)
tasmota
; tasmota-debug
; tasmota-ircustom ; alternative to 'tasmota' with full IR protocols activated, you will need to disable some features to keep code not too big
; tasmota-minimal
; tasmota-basic
; tasmota-knx
; tasmota-sensors
; tasmota-display
; tasmota-ir
[common]
; *** Use settings from file user_config_override.h
build_flags = ${core_active.build_flags}
-DUSE_CONFIG_OVERRIDE
; *** Upload Serial reset method for Wemos and NodeMCU
upload_port = COM5
[core_active]
platform = ${core_2_6_2.platform}
build_flags = ${core_2_6_2.build_flags}

View File

@ -6,6 +6,8 @@
- Change new Fade system much smoother, Speed now up to 40 (#6942, #3714) - Change new Fade system much smoother, Speed now up to 40 (#6942, #3714)
- Fix Arduino IDE function prototyping compile error (#6982) - Fix Arduino IDE function prototyping compile error (#6982)
- Change update lib IRremoteESP8266 updated to v2.7.1, -2.7k flash and -1.5k RAM for Tasmota-IR - Change update lib IRremoteESP8266 updated to v2.7.1, -2.7k flash and -1.5k RAM for Tasmota-IR
- Fix auto--power on/off when setting channel to non-zero or zero value, when SetOption68 1
- Fix postpone saving settings to flash until Fade is complete, avoids pause in Fade
### 7.0.0.5 20191118 ### 7.0.0.5 20191118

View File

@ -1444,27 +1444,24 @@ void LightPreparePower(power_t channels = 0xFFFFFFFF) { // 1 = only RGB, 2 =
#endif #endif
// If multi-channels, then we only switch off channels with a value of zero // If multi-channels, then we only switch off channels with a value of zero
if (Light.pwm_multi_channels) { if (Light.pwm_multi_channels) {
// for (uint32_t i = 0; i < Light.subtype; i++) { for (uint32_t i = 0; i < Light.subtype; i++) {
// // if channel is non-null, channel is supposed to be on, but it is off, do Power On if (bitRead(channels, i)) {
// if ((Light.current_color[i]) && (bitRead(Light.power, i)) && (0 == bitRead(power, i + Light.device - 1))) { // if channel is non-null, channel is supposed to be on, but it is off, do Power On
// ExecuteCommandPower(Light.device + i, POWER_ON_NO_STATE, SRC_LIGHT); if ((Light.current_color[i]) && (!bitRead(Light.power, i))) {
// //bitSet(Settings.power, i + Light.device - 1); if (!Settings.flag.not_power_linked) { // SetOption20 - Control power in relation to Dimmer/Color/Ct changes
// #ifdef DEBUG_LIGHT ExecuteCommandPower(Light.device + i, POWER_ON_NO_STATE, SRC_LIGHT);
// AddLog_P2(LOG_LEVEL_DEBUG, "ExecuteCommandPower ON device=%d", Light.device + i); }
// #endif } else {
// } // if channel is zero and channel is on, set it off
// // if channel is zero and channel is on, set it off if ((0 == Light.current_color[i]) && bitRead(Light.power, i)) {
// if ((0 == Light.current_color[i]) && bitRead(power, i + Light.device - 1)) { ExecuteCommandPower(Light.device + i, POWER_OFF_NO_STATE, SRC_LIGHT);
// ExecuteCommandPower(Light.device + i, POWER_OFF_NO_STATE, SRC_LIGHT); }
// //bitClear(Settings.power, i + Light.device - 1); }
// #ifdef DEBUG_LIGHT #ifdef USE_DOMOTICZ
// AddLog_P2(LOG_LEVEL_DEBUG, "ExecuteCommandPower OFF device=%d", Light.device + i); DomoticzUpdatePowerState(Light.device + i);
// #endif #endif // USE_DOMOTICZ
// } }
// #ifdef USE_DOMOTICZ }
// DomoticzUpdatePowerState(Light.device + i);
// #endif // USE_DOMOTICZ
// }
} else { } else {
if (light_controller.isCTRGBLinked()) { // linked, standard if (light_controller.isCTRGBLinked()) { // linked, standard
if (light_state.getBri() && !(Light.power)) { if (light_state.getBri() && !(Light.power)) {
@ -1795,6 +1792,12 @@ void LightApplyFade(void) {
// Note: Settings.light_speed is the number of half-seconds for a 100% fade, // Note: Settings.light_speed is the number of half-seconds for a 100% fade,
// i.e. light_speed=1 means 1024 steps in 10 ticks (500ms) // i.e. light_speed=1 means 1024 steps in 10 ticks (500ms)
Light.fade_duration = (distance * Settings.light_speed * 10) / 1024; Light.fade_duration = (distance * Settings.light_speed * 10) / 1024;
// Also postpone the save_data for the duration of the Fade (in seconds)
uint32_t delay_seconds = 1 + (Light.fade_duration + 19) / 20; // add one more second
// AddLog_P2(LOG_LEVEL_INFO, PSTR("delay_seconds %d, save_data_counter %d"), delay_seconds, save_data_counter);
if (save_data_counter < delay_seconds) {
save_data_counter = delay_seconds; // pospone
}
} else { } else {
// no fade needed, we keep the duration at zero, it will fallback directly to end of fade // no fade needed, we keep the duration at zero, it will fallback directly to end of fade
} }