Pocsagtxserial (#2099)

* sendpocsag first test
* optimize
* nicer
* overflow
This commit is contained in:
Totoo 2024-04-11 15:10:59 +02:00 committed by GitHub
parent 004799e1a3
commit e9c32504d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 143 additions and 0 deletions

View file

@ -76,6 +76,7 @@ class POCSAGTXView : public View {
void on_set_text(NavigationView& nav);
void on_tx_progress(const uint32_t progress, const bool done);
void on_remote(const PocsagTosendMessage data);
bool start_tx();
Labels labels{
@ -142,6 +143,13 @@ class POCSAGTXView : public View {
const auto message = *reinterpret_cast<const TXProgressMessage*>(p);
this->on_tx_progress(message.progress, message.done);
}};
MessageHandlerRegistration message_handler_tx_remote{
Message::ID::PocsagTosend,
[this](const Message* const p) {
const auto message = *reinterpret_cast<const PocsagTosendMessage*>(p);
this->on_remote(message);
}};
};
} /* namespace ui */