mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-12 03:34:58 -04:00
Map view in AIS (#213)
* Added GeoMapView to AISRecentEntryDetailView * Added autoupdate in AIS map
This commit is contained in:
parent
920b98f7c9
commit
262c030224
2 changed files with 45 additions and 5 deletions
|
@ -28,6 +28,8 @@
|
|||
#include "ui_rssi.hpp"
|
||||
#include "ui_channel.hpp"
|
||||
|
||||
#include "ui_geomap.hpp"
|
||||
|
||||
#include "event_m0.hpp"
|
||||
|
||||
#include "log_file.hpp"
|
||||
|
@ -116,11 +118,12 @@ class AISRecentEntryDetailView : public View {
|
|||
public:
|
||||
std::function<void(void)> on_close { };
|
||||
|
||||
AISRecentEntryDetailView();
|
||||
AISRecentEntryDetailView(NavigationView& nav);
|
||||
|
||||
void set_entry(const AISRecentEntry& new_entry);
|
||||
const AISRecentEntry& entry() const { return entry_; };
|
||||
|
||||
void update_position();
|
||||
void focus() override;
|
||||
void paint(Painter&) override;
|
||||
|
||||
|
@ -128,9 +131,15 @@ private:
|
|||
AISRecentEntry entry_ { };
|
||||
|
||||
Button button_done {
|
||||
{ 72, 216, 96, 24 },
|
||||
{ 125, 216, 96, 24 },
|
||||
"Done"
|
||||
};
|
||||
Button button_see_map {
|
||||
{ 19, 216, 96, 24 },
|
||||
"See on map"
|
||||
};
|
||||
GeoMapView* geomap_view { nullptr };
|
||||
bool send_updates { false };
|
||||
|
||||
Rect draw_field(
|
||||
Painter& painter,
|
||||
|
@ -160,6 +169,7 @@ private:
|
|||
static constexpr uint32_t initial_target_frequency = 162025000;
|
||||
static constexpr uint32_t sampling_rate = 2457600;
|
||||
static constexpr uint32_t baseband_bandwidth = 1750000;
|
||||
NavigationView& nav_;
|
||||
|
||||
AISRecentEntries recent { };
|
||||
std::unique_ptr<AISLogger> logger { };
|
||||
|
@ -169,7 +179,7 @@ private:
|
|||
{ "Name/Call", 20 },
|
||||
} };
|
||||
AISRecentEntriesView recent_entries_view { columns, recent };
|
||||
AISRecentEntryDetailView recent_entry_detail_view { };
|
||||
AISRecentEntryDetailView recent_entry_detail_view { nav_ };
|
||||
|
||||
static constexpr auto header_height = 1 * 16;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue