mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
code cleanup
This commit is contained in:
@@ -466,8 +466,6 @@ void TxService::send_telegram(const QueuedTxTelegram & tx_telegram) {
|
||||
tx_telegram.id_,
|
||||
telegram->to_string(telegram_raw, length).c_str());
|
||||
|
||||
// send the telegram to the UART Tx
|
||||
uint16_t status = EMSuart::transmit(telegram_raw, length);
|
||||
#ifdef EMSESP_DEBUG
|
||||
// if watching in 'raw' mode
|
||||
if (EMSESP::watch() == 2) {
|
||||
@@ -475,6 +473,9 @@ void TxService::send_telegram(const QueuedTxTelegram & tx_telegram) {
|
||||
}
|
||||
#endif
|
||||
|
||||
// send the telegram to the UART Tx
|
||||
uint16_t status = EMSuart::transmit(telegram_raw, length);
|
||||
|
||||
if (status == EMS_TX_STATUS_ERR) {
|
||||
LOG_ERROR(F("Failed to transmit Tx via UART."));
|
||||
increment_telegram_fail_count(); // another Tx fail
|
||||
@@ -616,7 +617,6 @@ void TxService::remember_tx(const uint8_t * data, const uint8_t length) {
|
||||
if (ems_mask() != EMS_MASK_UNSET) {
|
||||
telegram_last_[0] ^= ems_mask();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// add last Tx to tx queue and increment count
|
||||
|
||||
Reference in New Issue
Block a user