Refactor code

Refactor code
This commit is contained in:
Theo Arends 2019-08-10 18:12:25 +02:00
parent 03c54dab3e
commit 01ca5f5cfb
2 changed files with 4 additions and 7 deletions

View File

@ -125,8 +125,9 @@ bool DhtRead(uint8_t sensor)
uint8_t checksum = (dht_data[0] + dht_data[1] + dht_data[2] + dht_data[3]) & 0xFF;
if (dht_data[4] != checksum) {
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_DHT D_CHECKSUM_FAILURE " %02X, %02X, %02X, %02X, %02X =? %02X"),
dht_data[0], dht_data[1], dht_data[2], dht_data[3], dht_data[4], checksum);
char hex_char[15];
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_DHT D_CHECKSUM_FAILURE " %s =? %02X"),
ToHex(dht_data, 5, hex_char, sizeof(hex_char), ' '), checksum);
return false;
}

View File

@ -353,11 +353,7 @@ void solaxX1_Update(void) // Every Second
}
else
{
/* char hexCar[2];
for(int i=0; i<sizeof(value); i++){
sprintf(hexCar, "%02X", value[i]);
AddLog_P(LOG_LEVEL_DEBUG, hexCar);
}*/
// AddLogBuffer(LOG_LEVEL_DEBUG, value, sizeof(value));
solaxX1_nodata_count = 0;
solaxX1_send_retry = 2;