mirror of https://github.com/arendst/Tasmota.git
Disable some logging
This commit is contained in:
parent
71a9fbcf65
commit
3bb58b3ea0
|
@ -43,7 +43,7 @@ struct PS16DZ {
|
|||
|
||||
void PS16DZSerialSend(const char *tx_buffer)
|
||||
{
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("PSZ: Send %s"), tx_buffer);
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("PSZ: Send %s"), tx_buffer);
|
||||
|
||||
PS16DZSerial->print(tx_buffer);
|
||||
PS16DZSerial->write(0x1B);
|
||||
|
@ -96,7 +96,7 @@ void PS16DZSerialInput(void)
|
|||
Ps16dz.rx_buffer[Ps16dz.byte_counter++] = 0x00;
|
||||
|
||||
// AT+RESULT="sequence":"1554682835320"
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("PSZ: Rcvd %s"), Ps16dz.rx_buffer);
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("PSZ: Rcvd %s"), Ps16dz.rx_buffer);
|
||||
|
||||
if (!strncmp(Ps16dz.rx_buffer+3, "RESULT", 6)) {
|
||||
|
||||
|
@ -118,7 +118,7 @@ void PS16DZSerialInput(void)
|
|||
if (!strncmp(token2, "\"switch\"", 8)) {
|
||||
bool switch_state = !strncmp(token3, "\"on\"", 4) ? true : false;
|
||||
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("PSZ: Switch %d"), switch_state);
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("PSZ: Switch %d"), switch_state);
|
||||
|
||||
is_switch_change = (switch_state != power);
|
||||
if (is_switch_change) {
|
||||
|
@ -128,7 +128,7 @@ void PS16DZSerialInput(void)
|
|||
else if (!strncmp(token2, "\"bright\"", 8)) {
|
||||
Ps16dz.dimmer = atoi(token3);
|
||||
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("PSZ: Brightness %d"), Ps16dz.dimmer);
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("PSZ: Brightness %d"), Ps16dz.dimmer);
|
||||
|
||||
is_brightness_change = Ps16dz.dimmer != Settings.light_dimmer;
|
||||
if (power && (Ps16dz.dimmer > 0) && is_brightness_change) {
|
||||
|
@ -138,7 +138,7 @@ void PS16DZSerialInput(void)
|
|||
}
|
||||
else if (!strncmp(token2, "\"sequence\"", 10)) {
|
||||
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("PSZ: Sequence %s"), token3);
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("PSZ: Sequence %s"), token3);
|
||||
|
||||
}
|
||||
token = strtok_r(nullptr, ",", &end_str);
|
||||
|
@ -146,7 +146,7 @@ void PS16DZSerialInput(void)
|
|||
|
||||
if (!is_brightness_change) {
|
||||
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("PSZ: Update"));
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("PSZ: Update"));
|
||||
|
||||
PS16DZSerialSendOk();
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ struct SNFL1 {
|
|||
|
||||
void SnfL1Send(const char *buffer)
|
||||
{
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("SL1: Send %s"), buffer);
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("SL1: Send %s"), buffer);
|
||||
|
||||
Serial.print(buffer);
|
||||
Serial.write(0x1B);
|
||||
|
@ -79,7 +79,7 @@ bool SnfL1SerialInput(void)
|
|||
// AT+RESULT="sequence":"1554682835320"
|
||||
// AT+UPDATE="sequence":"34906","switch":"on","light_type":1,"colorR":0,"colorG":16,"colorB":0,"bright":6,"mode":1
|
||||
// AT+UPDATE="switch":"on","light_type":1,"colorR":255,"colorG":0,"colorB":0,"bright":6,"mode":1,"speed":100,"sensitive":10
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("SL1: Rcvd %s"), serial_in_buffer);
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("SL1: Rcvd %s"), serial_in_buffer);
|
||||
|
||||
if (!strncmp(serial_in_buffer +3, "RESULT", 6)) {
|
||||
Snfl1.receive_ready = true;
|
||||
|
@ -107,7 +107,7 @@ bool SnfL1SerialInput(void)
|
|||
|
||||
if (!strncmp(token2, "\"sequence\"", 10)) {
|
||||
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("SL1: Rcvd sequence %s"), token3);
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("SL1: Rcvd sequence %s"), token3);
|
||||
|
||||
token = nullptr;
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ bool SnfL1SerialInput(void)
|
|||
else if (!strncmp(token2, "\"switch\"", 8)) {
|
||||
switch_state = !strncmp(token3, "\"on\"", 4) ? true : false;
|
||||
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("SL1: Rcvd switch %d (%d)"), switch_state, Light.power);
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("SL1: Rcvd switch %d (%d)"), switch_state, Light.power);
|
||||
|
||||
is_power_change = (switch_state != Light.power);
|
||||
}
|
||||
|
@ -139,9 +139,9 @@ bool SnfL1SerialInput(void)
|
|||
bool all_color_channels_updated = color_updated[0] && color_updated[1] && color_updated[2];
|
||||
if (all_color_channels_updated) {
|
||||
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("SL1: Rcvd color R%d G%d B%d (R%d G%d B%d)"),
|
||||
current_color[0], current_color[1], current_color[2],
|
||||
Settings.light_color[0], Settings.light_color[1], Settings.light_color[2]);
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("SL1: Rcvd color R%d G%d B%d (R%d G%d B%d)"),
|
||||
// current_color[0], current_color[1], current_color[2],
|
||||
// Settings.light_color[0], Settings.light_color[1], Settings.light_color[2]);
|
||||
|
||||
is_color_change = (Light.power && (memcmp(current_color, Settings.light_color, 3) != 0));
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ bool SnfL1SerialInput(void)
|
|||
else if (!strncmp(token2, "\"bright\"", 8)) {
|
||||
uint8_t dimmer = atoi(token3);
|
||||
|
||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("SL1: Rcvd dimmer %d (%d)"), dimmer, Settings.light_dimmer);
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("SL1: Rcvd dimmer %d (%d)"), dimmer, Settings.light_dimmer);
|
||||
|
||||
is_brightness_change = (Light.power && (dimmer > 0) && (dimmer != Settings.light_dimmer));
|
||||
snprintf_P(cmnd_dimmer, sizeof(cmnd_dimmer), PSTR(D_CMND_DIMMER " %d"), dimmer);
|
||||
|
|
Loading…
Reference in New Issue