From 62df30eae3988f9e987b21d69157ebafc2cc9de3 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Fri, 24 Jul 2020 18:56:09 -0500 Subject: [PATCH] add heading information to adsb details view --- firmware/application/apps/ui_adsb_rx.cpp | 7 +++++-- firmware/application/apps/ui_adsb_rx.hpp | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/firmware/application/apps/ui_adsb_rx.cpp b/firmware/application/apps/ui_adsb_rx.cpp index 8a174e4c..c44868af 100644 --- a/firmware/application/apps/ui_adsb_rx.cpp +++ b/firmware/application/apps/ui_adsb_rx.cpp @@ -92,7 +92,7 @@ void ADSBRxDetailsView::update(const AircraftRecentEntry& entry) { text_last_seen.set(to_string_dec_uint(age / 60) + " minutes ago"); text_infos.set(entry_copy.info_string); - + text_info2.set("Hdg:" + to_string_dec_uint(entry_copy.velo.heading)); text_frame_pos_even.set(to_string_hex_array(entry_copy.frame_pos_even.get_raw_data(), 14)); text_frame_pos_odd.set(to_string_hex_array(entry_copy.frame_pos_odd.get_raw_data(), 14)); @@ -123,6 +123,7 @@ ADSBRxDetailsView::ADSBRxDetailsView( &text_airline, &text_country, &text_infos, + &text_info2, &text_frame_pos_even, &text_frame_pos_odd, &button_see_map @@ -237,8 +238,10 @@ void ADSBRxView::on_frame(const ADSBFrameMessage * message) { if (send_updates) details_view->update(entry); } - } else if(msg_type == 19 && (msg_sub >= 1 && msg_sub <= 4)){ + } else if(msg_type == 19 && msg_sub >= 1 && msg_sub <= 4){ entry.set_frame_velo(frame); + if (send_updates) + details_view->update(entry); } } recent_entries_view.set_dirty(); diff --git a/firmware/application/apps/ui_adsb_rx.hpp b/firmware/application/apps/ui_adsb_rx.hpp index 816992ee..6964aa9b 100644 --- a/firmware/application/apps/ui_adsb_rx.hpp +++ b/firmware/application/apps/ui_adsb_rx.hpp @@ -178,6 +178,12 @@ private: { 0 * 8, 6 * 16, 30 * 8, 16 }, "-" }; + + Text text_info2 { + {0*8, 7*16, 30*8, 16}, + "-" + }; + Text text_frame_pos_even { { 0 * 8, 13 * 16, 30 * 8, 16 }, "-"