mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-28 01:05:58 -04:00
Fix some Guru Meditation Faults in ADSB-RX app (#1483)
* Don't use screen_rect in functions called from rtc_timer_tick * Pause AircraftRecentEntry list changes when AC Details screen is displayed
This commit is contained in:
parent
29a36c8658
commit
a1856b9bb0
3 changed files with 24 additions and 15 deletions
|
@ -34,6 +34,8 @@ using namespace portapack;
|
|||
|
||||
namespace ui {
|
||||
|
||||
bool ac_details_view_active{false};
|
||||
|
||||
template <>
|
||||
void RecentEntriesTable<AircraftRecentEntries>::draw(
|
||||
const Entry& entry,
|
||||
|
@ -182,6 +184,7 @@ ADSBRxAircraftDetailsView::ADSBRxAircraftDetailsView(
|
|||
break;
|
||||
}
|
||||
button_close.on_select = [&nav](Button&) {
|
||||
ac_details_view_active = false;
|
||||
nav.pop();
|
||||
};
|
||||
};
|
||||
|
@ -217,6 +220,7 @@ void ADSBRxDetailsView::update(const AircraftRecentEntry& entry) {
|
|||
}
|
||||
|
||||
ADSBRxDetailsView::~ADSBRxDetailsView() {
|
||||
ac_details_view_active = false;
|
||||
on_close_();
|
||||
}
|
||||
|
||||
|
@ -260,6 +264,7 @@ ADSBRxDetailsView::ADSBRxDetailsView(
|
|||
text_icao_address.set(to_string_hex(entry_copy.ICAO_address, 6));
|
||||
|
||||
button_aircraft_details.on_select = [this, &nav](Button&) {
|
||||
ac_details_view_active = true;
|
||||
aircraft_details_view = nav.push<ADSBRxAircraftDetailsView>(entry_copy, [this]() { send_updates = false; });
|
||||
send_updates = false;
|
||||
};
|
||||
|
@ -433,6 +438,11 @@ void ADSBRxView::updateDetailsAndMap(int ageStep) {
|
|||
ui::GeoMarker marker;
|
||||
bool storeNewMarkers = false;
|
||||
|
||||
// NB: Temporarily pausing updates in rtc_timer_tick context when viewing AC Details screen (kludge for some Guru faults)
|
||||
// TODO: More targeted blocking of updates in rtc_timer_tick when ADSB processes are running
|
||||
if (ac_details_view_active)
|
||||
return;
|
||||
|
||||
// Sort and truncate the entries, grouped, newest group first
|
||||
sort_entries_by_state();
|
||||
truncate_entries(recent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue