mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-21 17:56:31 +00:00
TuyaMcu rewrite by btsimonh (#17051)
This commit is contained in:
parent
2e84433522
commit
13c27194ec
@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
|
||||
### Changed
|
||||
- Reverted Flash Mode back from ``DIO`` to ``DOUT`` for ESP8266/ESP8285 (#17019)
|
||||
- ESP32 Framework (Core) from v2.0.5.2 to v2.0.5.3 (#17034)
|
||||
- TuyaMcu rewrite by btsimonh (#17051)
|
||||
|
||||
### Fixed
|
||||
- SenseAir S8 module detection (#17033)
|
||||
|
@ -133,6 +133,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
|
||||
- DS18x20 ``DS18Alias`` to ``DS18Sens`` [#16833](https://github.com/arendst/Tasmota/issues/16833)
|
||||
- Compiling with reduced boards manifests in favour of Autoconfig [#16848](https://github.com/arendst/Tasmota/issues/16848)
|
||||
- ADE7953 monitoring from instant power to accumulated energy [#16941](https://github.com/arendst/Tasmota/issues/16941)
|
||||
- TuyaMcu rewrite by btsimonh [#17051](https://github.com/arendst/Tasmota/issues/17051)
|
||||
|
||||
### Fixed
|
||||
- Serial bridge default serial configuration from 5N1 to 8N1 regression from v10.1.0.3
|
||||
|
@ -331,6 +331,7 @@ struct TasmotaGlobal_t {
|
||||
uint8_t module_type; // Current copy of Settings->module or user template type
|
||||
uint8_t emulated_module_type; // Emulated module type as requested by ESP32
|
||||
uint8_t last_source; // Last command source
|
||||
uint8_t last_command_source; // Last command source
|
||||
uint8_t shutters_present; // Number of actual define shutters
|
||||
uint8_t discovery_counter; // Delayed discovery counter
|
||||
uint8_t power_on_delay; // Delay relay power on to reduce power surge (SetOption47)
|
||||
@ -681,7 +682,7 @@ void SleepDelay(uint32_t mseconds) {
|
||||
if (!TasmotaGlobal.backlog_nodelay && mseconds) {
|
||||
uint32_t wait = millis() + mseconds;
|
||||
while (!TimeReached(wait) && !Serial.available()) { // We need to service serial buffer ASAP as otherwise we get uart buffer overrun
|
||||
XdrvCall(FUNC_SLEEP_LOOP);
|
||||
XdrvCall(FUNC_SLEEP_LOOP); // Main purpose is reacting ASAP on serial data availability or interrupt handling (ADE7880)
|
||||
delay(1);
|
||||
}
|
||||
} else {
|
||||
|
@ -329,6 +329,7 @@ void ExecuteCommand(const char *cmnd, uint32_t source)
|
||||
// cmnd: "var1=1" = stopic "var1" and svalue "=1"
|
||||
SHOW_FREE_MEM(PSTR("ExecuteCommand"));
|
||||
ShowSource(source);
|
||||
TasmotaGlobal.last_command_source = source;
|
||||
|
||||
const char *pos = cmnd;
|
||||
while (*pos && isspace(*pos)) {
|
||||
|
@ -18,7 +18,10 @@
|
||||
*/
|
||||
|
||||
#ifdef USE_LIGHT
|
||||
#ifdef USE_TUYA_MCU
|
||||
#ifdef USE_TUYA_MCU_V1
|
||||
/*********************************************************************************************\
|
||||
* Tuya MCU V1
|
||||
\*********************************************************************************************/
|
||||
|
||||
#define XDRV_16 16
|
||||
#define XNRG_32 32 // Needs to be the last XNRG_xx
|
||||
@ -551,7 +554,7 @@ void TuyaSendHexString(uint8_t id, char data[]) {
|
||||
TuyaSendCmd(TUYA_CMD_SET_DP, payload_buffer, payload_len);
|
||||
}
|
||||
|
||||
void TuyaSendString(uint8_t id, char data[]) {
|
||||
void TuyaSendString(uint8_t id, const char data[]) {
|
||||
|
||||
uint16_t len = strlen(data);
|
||||
uint16_t payload_len = 4 + len;
|
2579
tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v2.ino
Normal file
2579
tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v2.ino
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user