code cleanup

This commit is contained in:
proddy
2020-06-15 15:00:06 +02:00
parent 598c61e57b
commit 9e84fefed6
2 changed files with 4 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ using uuid::log::Level;
// clang-format off
#define LOG_DEBUG(...) if (logger_.enabled(Level::DEBUG)) {logger_.debug(__VA_ARGS__);}
#define LOG_DEBUG(...) logger_.debug(__VA_ARGS__)
#define LOG_INFO(...) logger_.info(__VA_ARGS__)
#define LOG_TRACE(...) logger_.trace(__VA_ARGS__)
#define LOG_NOTICE(...) logger_.notice(__VA_ARGS__)
@@ -51,7 +51,6 @@ using uuid::log::Level;
#define MAKE_PSTR(string_name, string_literal) static const char __pstr__##string_name[] __attribute__((__aligned__(sizeof(int)))) PROGMEM = string_literal;
#define MAKE_PSTR_WORD(string_name) MAKE_PSTR(string_name, #string_name)
#define F_(string_name) FPSTR(__pstr__##string_name)
#define NO_ARGUMENTS std::vector<std::string>{}
// clang-format on

View File

@@ -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