Skip to content

Commit

Permalink
Merge pull request #2 from arendst/development
Browse files Browse the repository at this point in the history
Sync repo
  • Loading branch information
crispy78 authored Jan 16, 2021
2 parents 32cc7a1 + 1cd7295 commit 63f14ad
Show file tree
Hide file tree
Showing 54 changed files with 1,560 additions and 498 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
.clang_complete
.gcc-flags.json
.cache
data
unpacked_fs
tasmota/user_config_override.h
build
build_output
Expand Down
11 changes: 8 additions & 3 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Callback Id | Bool | xdrv | xsns | xnrg | xlgt | Description
----------------------------|------|------|------|------|------|----------------------------------
FUNC_SETTINGS_OVERRIDE | | x | | | | Override start-up settings
FUNC_PIN_STATE | x | 1 | 2 | | | At GPIO configuration
FUNC_MODULE_INIT | x | 1 | | | 2 | Init module specific parameters
FUNC_PRE_INIT | | 1 | | 2 | | Once GPIO have been established
FUNC_MODULE_INIT | x | 3 | 1 | | 2 | Init module specific parameters
FUNC_PRE_INIT | | 1 | 3 | 2 | | Once GPIO have been established
FUNC_INIT | | 1 | 3 | 2 | | At end of initialisation
FUNC_LOOP | | 1 | 2 | | | In main loop
FUNC_EVERY_50_MSECOND | | 1 | 2 | | |
Expand All @@ -34,7 +34,7 @@ FUNC_COMMAND_SENSOR | x | | x | | | When command Se
FUNC_MQTT_SUBSCRIBE | | x | | | | At end of MQTT subscriptions
FUNC_MQTT_INIT | | x | | | | Once at end of MQTT connection
FUNC_MQTT_DATA | x | x | | | | Before decoding command
FUNC_SET_POWER | | x | | | | Before setting relays
FUNC_SET_POWER | | 1 | 2 | | | Before setting relays
FUNC_SET_DEVICE_POWER | x | x | | | | Set relay
FUNC_SHOW_SENSOR | | x | | | | When FUNC_JSON_APPEND completes
FUNC_ANY_KEY | | x | | | |
Expand All @@ -49,6 +49,8 @@ FUNC_WEB_ADD_MAIN_BUTTON | | 1 | 2 | | | Add a main butt
FUNC_WEB_ADD_HANDLER | | 1 | 2 | | | Add a webserver handler
FUNC_SET_CHANNELS | | 2 | | | 1 |
FUNC_SET_SCHEME | | | | | x |
FUNC_HOTPLUG_SCAN | | | x | | |
FUNC_DEVICE_GROUP_ITEM | | x | | | |

The numbers represent the sequence of execution

Expand Down Expand Up @@ -89,12 +91,15 @@ CFG: Loaded from flash at FB, Count 1581
xdrv - FUNC_SETTINGS_OVERRIDE
xdrv - FUNC_PIN_STATE
xsns - FUNC_PIN_STATE
xsns - FUNC_MODULE_INIT
xdrv - FUNC_MODULE_INIT
xlgt - FUNC_MODULE_INIT
xdrv - FUNC_PRE_INIT
xnrg - FUNC_PRE_INIT
xsns - FUNC_PRE_INIT
SRC: Restart
xdrv - FUNC_SET_POWER
xsns - FUNC_SET_POWER
xlgt - FUNC_SET_CHANNELS
xdrv - FUNC_SET_DEVICE_POWER
Project tasmota Wemos 2 Version 7.0.0.3(tasmota)-STAGE
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ All notable changes to this project will be documented in this file.
- Support for BS814A-2 8-button touch buttons by Peter Franck (#10447)
- Support for up to 4 I2C SEESAW_SOIL Capacitance & Temperature sensors by Peter Franck (#10481)
- ESP8266 Support for 2MB and up linker files with 1MB and up LittleFS
- ESP32 support for TLS MQTT using BearSSL (same as ESP8266)

### Breaking Changed
- ESP32 switch from default SPIFFS to default LittleFS file system loosing current (zigbee) files
- ESP8266 until now NOT SUPPORTED linker files 2MB and up. Current settings will be overwritten once LittleFS is enabled

### Changed
- Force initial default state ``SetOption57 1`` to scan wifi network every 44 minutes for strongest signal (#10395)
- Command ``Sleep 0`` removes any sleep from wifi modem except when ESP32 BLE is active

## [9.2.0.2] 20210105
### Added
Expand Down
2 changes: 1 addition & 1 deletion I2CDEVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Index | Define | Driver | Device | Address(es) | Description
50 | USE_VEML7700 | xsns_71 | VEML7700 | 0x10 | Ambient light intensity sensor
51 | USE_MCP9808 | xsns_72 | MCP9808 | 0x18 - 0x1F | Temperature sensor
52 | USE_HP303B | xsns_73 | HP303B | 0x76 - 0x77 | Pressure and temperature sensor
53 | USE_MLX90640 | xdrv_84 | MLX90640 | 0x33 | IR array temperature sensor
53 | USE_MLX90640 | xdrv_43 | MLX90640 | 0x33 | IR array temperature sensor
54 | USE_VL53L1X | xsns_77 | VL53L1X | 0x29 | Time-of-flight (ToF) distance sensor
55 | USE_EZOPH | xsns_78 | EZOPH | 0x61 - 0x70 | pH sensor
55 | USE_EZOORP | xsns_78 | EZOORP | 0x61 - 0x70 | ORP sensor
Expand Down
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
- Replaced RA8876 GPIO selection from ``SPI CS`` by ``RA8876 CS``

### Changed
- Command ``Sleep 0`` removes any sleep from wifi modem except when ESP32 BLE is active
- Logging from heap to stack freeing 700 bytes RAM
- Disabled ``USE_LIGHT`` light support for ZBBridge saving 17.6kB [#10374](https://github.com/arendst/Tasmota/issues/10374)
- Force initial default state ``SetOption57 1`` to scan wifi network every 44 minutes for strongest signal [#10395](https://github.com/arendst/Tasmota/issues/10395)
Expand Down
31 changes: 11 additions & 20 deletions lib/libesp32/ESP32-to-ESP8266-compat/src/ESP32Wifi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@
#undef WiFi
#endif

void WiFiClass32::setSleepMode(int iSleepMode)
{
// WIFI_MODEM_SLEEP
WiFi.setSleep(iSleepMode != WIFI_MODEM_SLEEP);
void WiFiClass32::setSleepMode(int iSleepMode) {
// WIFI_LIGHT_SLEEP and WIFI_MODEM_SLEEP
WiFi.setSleep(iSleepMode != WIFI_NONE_SLEEP);
}

int WiFiClass32::getPhyMode()
{
int WiFiClass32::getPhyMode() {
int phy_mode = 0; // " BGNL"
uint8_t protocol_bitmap;
if (esp_wifi_get_protocol(WIFI_IF_STA, &protocol_bitmap) == ESP_OK) {
Expand All @@ -47,12 +45,10 @@ int WiFiClass32::getPhyMode()
return phy_mode;
}

void WiFiClass32::wps_disable()
{
void WiFiClass32::wps_disable() {
}

void WiFiClass32::setOutputPower(int n)
{
void WiFiClass32::setOutputPower(int n) {
wifi_power_t p = WIFI_POWER_2dBm;
if (n > 19)
p = WIFI_POWER_19_5dBm;
Expand All @@ -75,28 +71,23 @@ void WiFiClass32::setOutputPower(int n)
WiFi.setTxPower(p);
}

void WiFiClass32::forceSleepBegin()
{
void WiFiClass32::forceSleepBegin() {
}

void WiFiClass32::forceSleepWake()
{
void WiFiClass32::forceSleepWake() {
}

bool WiFiClass32::getNetworkInfo(uint8_t i, String &ssid, uint8_t &encType, int32_t &rssi, uint8_t *&bssid, int32_t &channel, bool &hidden_scan)
{
bool WiFiClass32::getNetworkInfo(uint8_t i, String &ssid, uint8_t &encType, int32_t &rssi, uint8_t *&bssid, int32_t &channel, bool &hidden_scan) {
hidden_scan = false;
return WiFi.getNetworkInfo(i, ssid, encType, rssi, bssid, channel);
}

void wifi_station_disconnect()
{
void wifi_station_disconnect() {
// erase ap: empty ssid, ...
WiFi.disconnect(true, true);
}

void wifi_station_dhcpc_start()
{
void wifi_station_dhcpc_start() {
}

WiFiClass32 WiFi32;
1 change: 1 addition & 0 deletions lib/libesp32/ESP32-to-ESP8266-compat/src/ESP8266WiFi.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define ENC_TYPE_TKIP WIFI_AUTH_WPA_WPA2_PSK
#define ENC_TYPE_AUTO WIFI_AUTH_MAX + 1

#define WIFI_NONE_SLEEP 0
#define WIFI_LIGHT_SLEEP 1
#define WIFI_MODEM_SLEEP 2

Expand Down
Loading

0 comments on commit 63f14ad

Please sign in to comment.