mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-22 22:04:24 -04:00
Setfreq usb command (#2235)
* SetFreq usb command for rx apps * code format, better check
This commit is contained in:
parent
a2c4fefe34
commit
02b75f567a
30 changed files with 202 additions and 0 deletions
|
@ -185,6 +185,7 @@ class APRSRxView : public View {
|
|||
|
||||
std::string title() const override { return "APRS RX"; };
|
||||
void on_packet(const APRSPacketMessage* message);
|
||||
void on_freqchg(int64_t freq);
|
||||
|
||||
private:
|
||||
void on_data(uint32_t value, bool is_data);
|
||||
|
@ -271,6 +272,13 @@ class APRSRXView : public View {
|
|||
this->view_stream.on_packet(message);
|
||||
this->view_table.on_pkt(message);
|
||||
}};
|
||||
|
||||
MessageHandlerRegistration message_handler_freqchg{
|
||||
Message::ID::FreqChangeCommand,
|
||||
[this](Message* const p) {
|
||||
const auto message = static_cast<const FreqChangeCommandMessage*>(p);
|
||||
this->view_stream.on_freqchg(message->freq);
|
||||
}};
|
||||
};
|
||||
|
||||
} /* namespace ui */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue