Beep-on-packet support in POCSAG app (#2061)

This commit is contained in:
Mark Thompson 2024-03-29 15:27:53 -05:00 committed by GitHub
parent fe2fbb847f
commit 0db65ccb6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 0 deletions

View file

@ -136,6 +136,10 @@ POCSAGAppView::POCSAGAppView(NavigationView& nav)
};
refresh_ui();
if (pmem::beep_on_packets())
audio::set_rate(audio::Rate::Hz_24000);
audio::output::start();
receiver_model.enable();
baseband::set_pocsag();
@ -304,6 +308,10 @@ void POCSAGAppView::on_packet(const POCSAGPacketMessage* message) {
// Set status icon color to indicate state machine state.
image_status.set_foreground(get_status_color(pocsag_state));
if (pmem::beep_on_packets()) {
baseband::request_audio_beep(1000, 24000, 60);
}
}
void POCSAGAppView::on_stats(const POCSAGStatsMessage* stats) {