diff --git a/firmware/application/ais_app.cpp b/firmware/application/ais_app.cpp index 13abac8e..3eae505b 100644 --- a/firmware/application/ais_app.cpp +++ b/firmware/application/ais_app.cpp @@ -320,18 +320,18 @@ void AISRecentEntryDetailView::paint(Painter& painter) { auto field_rect = Rect { rect.left(), rect.top() + 16, rect.width(), 16 }; const size_t mmsi_length = 9; - field_rect = draw_field(painter, field_rect, s, "MMSI", to_string_dec_int(entry.mmsi, mmsi_length)); - field_rect = draw_field(painter, field_rect, s, "Name", entry.name); - field_rect = draw_field(painter, field_rect, s, "Call", entry.call_sign); - field_rect = draw_field(painter, field_rect, s, "Dest", entry.destination); - field_rect = draw_field(painter, field_rect, s, "Lat ", ais::format::latlon_normalized(entry.last_position.latitude) + "N"); - field_rect = draw_field(painter, field_rect, s, "Lon ", ais::format::latlon_normalized(entry.last_position.longitude) + "E"); - field_rect = draw_field(painter, field_rect, s, "Stat", ais::format::navigational_status(entry.navigational_status)); - field_rect = draw_field(painter, field_rect, s, "Rx #", to_string_dec_uint(entry.received_count, 10)); + field_rect = draw_field(painter, field_rect, s, "MMSI", to_string_dec_int(entry_.mmsi, mmsi_length)); + field_rect = draw_field(painter, field_rect, s, "Name", entry_.name); + field_rect = draw_field(painter, field_rect, s, "Call", entry_.call_sign); + field_rect = draw_field(painter, field_rect, s, "Dest", entry_.destination); + field_rect = draw_field(painter, field_rect, s, "Lat ", ais::format::latlon_normalized(entry_.last_position.latitude) + "N"); + field_rect = draw_field(painter, field_rect, s, "Lon ", ais::format::latlon_normalized(entry_.last_position.longitude) + "E"); + field_rect = draw_field(painter, field_rect, s, "Stat", ais::format::navigational_status(entry_.navigational_status)); + field_rect = draw_field(painter, field_rect, s, "Rx #", to_string_dec_uint(entry_.received_count, 10)); } -void AISRecentEntryDetailView::set_entry(const AISRecentEntry& new_entry) { - entry = new_entry; +void AISRecentEntryDetailView::set_entry(const AISRecentEntry& entry) { + entry_ = entry; } AISAppView::AISAppView() { diff --git a/firmware/application/ais_app.hpp b/firmware/application/ais_app.hpp index 9c8ebe08..8c0237ac 100644 --- a/firmware/application/ais_app.hpp +++ b/firmware/application/ais_app.hpp @@ -144,12 +144,13 @@ public: AISRecentEntryDetailView(); void set_entry(const AISRecentEntry& new_entry); + const AISRecentEntry& entry() const { return entry_; }; void focus() override; void paint(Painter&) override; private: - AISRecentEntry entry; + AISRecentEntry entry_; Button button_done { { 72, 192, 96, 24 },