mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-11 09:09:29 +00:00
AISView RecentEntry UI selection by encoder.
This commit is contained in:
@@ -37,6 +37,8 @@ using namespace lpc43xx;
|
||||
#include <list>
|
||||
#include <utility>
|
||||
|
||||
#include <iterator>
|
||||
|
||||
namespace baseband {
|
||||
namespace ais {
|
||||
|
||||
@@ -130,9 +132,15 @@ public:
|
||||
void on_focus() override;
|
||||
void on_blur() override;
|
||||
|
||||
bool on_encoder(const EncoderEvent event) override;
|
||||
|
||||
private:
|
||||
AISModel model;
|
||||
|
||||
using EntryKey = baseband::ais::MMSI;
|
||||
EntryKey selected_key;
|
||||
const EntryKey invalid_key = 0xffffffff;
|
||||
|
||||
bool has_focus = false;
|
||||
|
||||
struct Position {
|
||||
@@ -160,9 +168,14 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
std::list<RecentEntry> recent;
|
||||
using RecentEntries = std::list<RecentEntry>;
|
||||
RecentEntries recent;
|
||||
|
||||
void on_packet(const baseband::ais::Packet& packet);
|
||||
|
||||
RecentEntries::iterator selected_entry();
|
||||
|
||||
void advance(const int32_t amount);
|
||||
};
|
||||
|
||||
} /* namespace ui */
|
||||
|
||||
Reference in New Issue
Block a user