Disable TUYA_MORE_DEBUG

This commit is contained in:
Theo Arends 2022-11-13 15:15:10 +01:00
parent 13c27194ec
commit b2239b4dce

View File

@ -45,6 +45,10 @@
#define TUYA_DIMMER_ID 0 #define TUYA_DIMMER_ID 0
#endif #endif
//#define TUYA_MORE_DEBUG
/*********************************************************************************************/
#define TUYA_CMD_HEARTBEAT 0x00 #define TUYA_CMD_HEARTBEAT 0x00
#define TUYA_CMD_QUERY_PRODUCT 0x01 #define TUYA_CMD_QUERY_PRODUCT 0x01
#define TUYA_CMD_MCU_CONF 0x02 #define TUYA_CMD_MCU_CONF 0x02
@ -108,8 +112,6 @@
// uses subcommands, 01->learning, 02->data, 03->report. // uses subcommands, 01->learning, 02->data, 03->report.
#define TUYA_CMD_RF 0x33 // not implemented #define TUYA_CMD_RF 0x33 // not implemented
#define TUYA_LOW_POWER_CMD_WIFI_STATE 0x02 #define TUYA_LOW_POWER_CMD_WIFI_STATE 0x02
#define TUYA_LOW_POWER_CMD_WIFI_RESET 0x03 #define TUYA_LOW_POWER_CMD_WIFI_RESET 0x03
#define TUYA_LOW_POWER_CMD_WIFI_CONFIG 0x04 #define TUYA_LOW_POWER_CMD_WIFI_CONFIG 0x04
@ -128,16 +130,8 @@
#define TUYA_BYTE_TIMEOUT_MS 500 #define TUYA_BYTE_TIMEOUT_MS 500
#define TUYA_MORE_DEBUG
#include <TasmotaSerial.h>
#define TUYAREAD32FROMPTR(x) (((uint8_t*)x)[0] << 24 | ((uint8_t*)x)[1] << 16 | ((uint8_t*)x)[2] << 8 | ((uint8_t*)x)[3]) #define TUYAREAD32FROMPTR(x) (((uint8_t*)x)[0] << 24 | ((uint8_t*)x)[1] << 16 | ((uint8_t*)x)[2] << 8 | ((uint8_t*)x)[3])
enum { enum {
TUYA_STARTUP_STATE_INIT = 0, TUYA_STARTUP_STATE_INIT = 0,
TUYA_STARTUP_STATE_WAIT_ACK_INIT, // 1 TUYA_STARTUP_STATE_WAIT_ACK_INIT, // 1
@ -164,7 +158,7 @@ enum {
}; };
#include <TasmotaSerial.h>
TasmotaSerial *TuyaSerial = nullptr; TasmotaSerial *TuyaSerial = nullptr;
#define TUYA_MAX_STORED_DPs 10 #define TUYA_MAX_STORED_DPs 10
@ -269,7 +263,6 @@ TUYA_STRUCT *pTuya = (TUYA_STRUCT *)0;
void TuyaSendState(uint8_t id, uint8_t type, uint8_t* value, int len); void TuyaSendState(uint8_t id, uint8_t type, uint8_t* value, int len);
int init_tuya_struct() { int init_tuya_struct() {
if (pTuya) return 0; // done already if (pTuya) return 0; // done already
pTuya = (TUYA_STRUCT *)malloc(sizeof(TUYA_STRUCT)); pTuya = (TUYA_STRUCT *)malloc(sizeof(TUYA_STRUCT));