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

2
main/ugv_comms.hh

@ -19,7 +19,7 @@ namespace messages = uas::ugv::messages; @@ -19,7 +19,7 @@ namespace messages = uas::ugv::messages;
class CommsClass {
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);
CommsClass();

Loading…
Cancel
Save