Show yaw angle on display
This commit is contained in:
parent
c734a9c32c
commit
1e3adb691e
@ -40,7 +40,7 @@ void DisplayClass::Run() {
|
||||
int8_t last_packet_snr;
|
||||
#endif
|
||||
TickType_t last_packet_tick;
|
||||
messages::UGV_State state;
|
||||
messages::UGV_Status status;
|
||||
|
||||
ESP_LOGD(TAG, "Started display thread");
|
||||
while (true) {
|
||||
@ -52,7 +52,7 @@ void DisplayClass::Run() {
|
||||
|
||||
comms_->Lock();
|
||||
last_packet_tick = comms_->last_packet_tick;
|
||||
state = comms_->status.state();
|
||||
status.CopyFrom(comms_->status);
|
||||
#ifdef COMMS_SX127X
|
||||
last_packet_rssi = comms_->last_packet_rssi;
|
||||
last_packet_snr = comms_->last_packet_snr;
|
||||
@ -71,7 +71,7 @@ void DisplayClass::Run() {
|
||||
heap_info.total_free_bytes);
|
||||
|
||||
oled->setCursor(4, 3 * 8);
|
||||
oled->printf("state: %d", (int)state);
|
||||
oled->printf("state: %d", status.state());
|
||||
|
||||
if (last_packet_tick > 0) {
|
||||
double time_since_last_packet =
|
||||
@ -89,6 +89,8 @@ void DisplayClass::Run() {
|
||||
oled->setCursor(4, 4 * 8);
|
||||
oled->print("no pkt rx");
|
||||
}
|
||||
oled->setCursor(4, 5 * 8);
|
||||
oled->printf("yaw angle: %f", status.yaw_angle());
|
||||
} while (oled->nextPage());
|
||||
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user