|
|
@ -40,6 +40,7 @@ void DisplayClass::Run() { |
|
|
|
int8_t last_packet_snr; |
|
|
|
int8_t last_packet_snr; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
TickType_t last_packet_tick; |
|
|
|
TickType_t last_packet_tick; |
|
|
|
|
|
|
|
messages::UGV_State state; |
|
|
|
|
|
|
|
|
|
|
|
ESP_LOGD(TAG, "Started display thread"); |
|
|
|
ESP_LOGD(TAG, "Started display thread"); |
|
|
|
while (true) { |
|
|
|
while (true) { |
|
|
@ -51,6 +52,7 @@ void DisplayClass::Run() { |
|
|
|
|
|
|
|
|
|
|
|
comms_->Lock(); |
|
|
|
comms_->Lock(); |
|
|
|
last_packet_tick = comms_->last_packet_tick; |
|
|
|
last_packet_tick = comms_->last_packet_tick; |
|
|
|
|
|
|
|
state = comms_->status.state(); |
|
|
|
#ifdef COMMS_SX127X |
|
|
|
#ifdef COMMS_SX127X |
|
|
|
last_packet_rssi = comms_->last_packet_rssi; |
|
|
|
last_packet_rssi = comms_->last_packet_rssi; |
|
|
|
last_packet_snr = comms_->last_packet_snr; |
|
|
|
last_packet_snr = comms_->last_packet_snr; |
|
|
@ -68,10 +70,8 @@ void DisplayClass::Run() { |
|
|
|
oled->printf("heap allc/free %d/%d", heap_info.total_allocated_bytes, |
|
|
|
oled->printf("heap allc/free %d/%d", heap_info.total_allocated_bytes, |
|
|
|
heap_info.total_free_bytes); |
|
|
|
heap_info.total_free_bytes); |
|
|
|
|
|
|
|
|
|
|
|
#ifdef COMMS_SX127X |
|
|
|
|
|
|
|
oled->setCursor(4, 3 * 8); |
|
|
|
oled->setCursor(4, 3 * 8); |
|
|
|
oled->printf("rssi: %d lna gain: %d", lora_rssi, lora_lna_gain); |
|
|
|
oled->printf("state: %d", (int) state); |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (last_packet_tick > 0) { |
|
|
|
if (last_packet_tick > 0) { |
|
|
|
double time_since_last_packet = |
|
|
|
double time_since_last_packet = |
|
|
|