mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
some typos
This commit is contained in:
@@ -94,11 +94,13 @@ void DallasSensor::loop() {
|
||||
} else if (time_now - last_activity_ > READ_TIMEOUT_MS) {
|
||||
LOG_WARNING(F("Dallas sensor read timeout"));
|
||||
state_ = State::IDLE;
|
||||
sensorfails_++;
|
||||
}
|
||||
} else if (state_ == State::SCANNING) {
|
||||
if (time_now - last_activity_ > SCAN_TIMEOUT_MS) {
|
||||
LOG_ERROR(F("Dallas sensor scan timeout"));
|
||||
state_ = State::IDLE;
|
||||
sensorfails_++;
|
||||
} else {
|
||||
uint8_t addr[ADDR_LEN] = {0};
|
||||
|
||||
|
||||
@@ -279,7 +279,7 @@ void TxService::send() {
|
||||
}
|
||||
|
||||
// if there's nothing in the queue to transmit or sending should be delayed, send back a poll and quit
|
||||
if (tx_telegrams_.empty() || (delayed_send_ && uuid::get_uptime() < (delayed_send_ + POST_SEND_DELAY))) {
|
||||
if (tx_telegrams_.empty() || (delayed_send_ && uuid::get_uptime() < delayed_send_)) {
|
||||
send_poll();
|
||||
return;
|
||||
}
|
||||
@@ -430,7 +430,7 @@ void TxService::add(const uint8_t operation,
|
||||
}
|
||||
|
||||
if (front) {
|
||||
tx_telegrams_.emplace_front(tx_telegram_id_++, std::move(telegram), false); // add to back of queue
|
||||
tx_telegrams_.emplace_front(tx_telegram_id_++, std::move(telegram), false); // add to front of queue
|
||||
} else {
|
||||
tx_telegrams_.emplace_back(tx_telegram_id_++, std::move(telegram), false); // add to back of queue
|
||||
}
|
||||
@@ -538,8 +538,7 @@ void TxService::add(uint8_t operation, const uint8_t * data, const uint8_t lengt
|
||||
|
||||
if (front) {
|
||||
// tx_telegrams_.push_front(qtxt); // add to front of queue
|
||||
tx_telegrams_.emplace_front(tx_telegram_id_++, std::move(telegram), false); // add to back of queue
|
||||
|
||||
tx_telegrams_.emplace_front(tx_telegram_id_++, std::move(telegram), false); // add to front of queue
|
||||
} else {
|
||||
// tx_telegrams_.push_back(qtxt); // add to back of queue
|
||||
tx_telegrams_.emplace_back(tx_telegram_id_++, std::move(telegram), false); // add to back of queue
|
||||
@@ -664,7 +663,7 @@ uint16_t TxService::post_send_query() {
|
||||
LOG_DEBUG(F("Sending post validate read, type ID 0x%02X to dest 0x%02X"), post_typeid, dest);
|
||||
set_post_send_query(0); // reset
|
||||
// delay the request if we have a different type_id for post_send_query
|
||||
delayed_send_ = (this->telegram_last_->type_id == post_typeid) ? 0 : uuid::get_uptime();
|
||||
delayed_send_ = (this->telegram_last_->type_id == post_typeid) ? 0 : (uuid::get_uptime() + POST_SEND_DELAY);
|
||||
}
|
||||
|
||||
return post_typeid;
|
||||
|
||||
Reference in New Issue
Block a user