mirror of
https://github.com/esphome/esphome.git
synced 2024-12-10 14:45:56 +01:00
added logs for outgoing commands
This commit is contained in:
parent
1e05bcaa61
commit
b3ca1023e8
@ -84,6 +84,7 @@ uint8_t DfrobotSen0395Component::find_prompt_() {
|
|||||||
uint8_t DfrobotSen0395Component::send_cmd_(const char *cmd, uint32_t duration) {
|
uint8_t DfrobotSen0395Component::send_cmd_(const char *cmd, uint32_t duration) {
|
||||||
// The interval between two commands must be larger than the specified duration (in ms).
|
// The interval between two commands must be larger than the specified duration (in ms).
|
||||||
if (millis() - ts_last_cmd_sent_ > duration) {
|
if (millis() - ts_last_cmd_sent_ > duration) {
|
||||||
|
ESP_LOGV(TAG, "Command: %s", cmd);
|
||||||
this->write_str(cmd);
|
this->write_str(cmd);
|
||||||
ts_last_cmd_sent_ = millis();
|
ts_last_cmd_sent_ = millis();
|
||||||
return 1; // Command sent
|
return 1; // Command sent
|
||||||
|
Loading…
Reference in New Issue
Block a user