mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-11-21 20:40:51 -05:00
Beep on search find something.
Beep on search find something. Solves #2643
This commit is contained in:
parent
46d87d95ae
commit
d80f41e9d7
1 changed files with 11 additions and 0 deletions
|
|
@ -26,8 +26,10 @@
|
|||
#include "binder.hpp"
|
||||
#include "string_format.hpp"
|
||||
#include "ui_freqman.hpp"
|
||||
#include "audio.hpp"
|
||||
|
||||
using namespace portapack;
|
||||
namespace pmem = portapack::persistent_memory;
|
||||
|
||||
namespace ui {
|
||||
|
||||
|
|
@ -121,9 +123,15 @@ SearchView::SearchView(
|
|||
|
||||
on_range_changed();
|
||||
receiver_model.enable();
|
||||
|
||||
if (pmem::beep_on_packets()) {
|
||||
audio::set_rate(audio::Rate::Hz_24000);
|
||||
audio::output::start();
|
||||
}
|
||||
}
|
||||
|
||||
SearchView::~SearchView() {
|
||||
audio::output::stop();
|
||||
receiver_model.disable();
|
||||
baseband::shutdown();
|
||||
}
|
||||
|
|
@ -205,6 +213,9 @@ void SearchView::do_detection() {
|
|||
|
||||
locked = true;
|
||||
locked_bin = bin_max;
|
||||
if (pmem::beep_on_packets()) {
|
||||
baseband::request_audio_beep(1000, 24000, 60);
|
||||
}
|
||||
// TODO: open Audio.
|
||||
} else
|
||||
text_infos.set("Out of range");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue