Browse Source

less verbose logging in ugv_comms

try-fix-comms-errors
Alex Mikhalev 6 years ago
parent
commit
dd86a105f3
  1. 4
      main/ugv_comms.cc
  2. 2
      main/ugv_comms.hh

4
main/ugv_comms.cc

@ -152,7 +152,7 @@ void CommsClass::RunTask() {
ESP_LOGE(TAG, "invalid packet len received: %d", packet_len); ESP_LOGE(TAG, "invalid packet len received: %d", packet_len);
packet_len = -1; packet_len = -1;
} else { } else {
ESP_LOGI(TAG, "rx packet len: %d", packet_len); ESP_LOGV(TAG, "rx packet len: %d", packet_len);
} }
} }
} else { // receiving packet data now } else { // receiving packet data now
@ -161,7 +161,7 @@ void CommsClass::RunTask() {
ESP_LOGE(TAG, "timeout for packet rx"); ESP_LOGE(TAG, "timeout for packet rx");
lora.Flush(); lora.Flush();
} else { } else {
ESP_LOGI(TAG, "rx data: %.*s", packet_len, rx_buf); ESP_LOGV(TAG, "rx data: %.*s", packet_len, rx_buf);
HandlePacket(rx_buf, packet_len); HandlePacket(rx_buf, packet_len);
} }
packet_len = -1; // wait for new packet len packet_len = -1; // wait for new packet len

2
main/ugv_comms.hh

@ -19,7 +19,7 @@ namespace messages = uas::ugv::messages;
class CommsClass { class CommsClass {
public: public:
static constexpr int MAX_PACKET_LEN = 255; static constexpr int MAX_PACKET_LEN = 128;
static constexpr TickType_t PACKET_RX_TIMEOUT = pdMS_TO_TICKS(200); static constexpr TickType_t PACKET_RX_TIMEOUT = pdMS_TO_TICKS(200);
CommsClass(); CommsClass();

Loading…
Cancel
Save