mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-11-23 05:20:31 -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 "binder.hpp"
|
||||||
#include "string_format.hpp"
|
#include "string_format.hpp"
|
||||||
#include "ui_freqman.hpp"
|
#include "ui_freqman.hpp"
|
||||||
|
#include "audio.hpp"
|
||||||
|
|
||||||
using namespace portapack;
|
using namespace portapack;
|
||||||
|
namespace pmem = portapack::persistent_memory;
|
||||||
|
|
||||||
namespace ui {
|
namespace ui {
|
||||||
|
|
||||||
|
|
@ -121,9 +123,15 @@ SearchView::SearchView(
|
||||||
|
|
||||||
on_range_changed();
|
on_range_changed();
|
||||||
receiver_model.enable();
|
receiver_model.enable();
|
||||||
|
|
||||||
|
if (pmem::beep_on_packets()) {
|
||||||
|
audio::set_rate(audio::Rate::Hz_24000);
|
||||||
|
audio::output::start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchView::~SearchView() {
|
SearchView::~SearchView() {
|
||||||
|
audio::output::stop();
|
||||||
receiver_model.disable();
|
receiver_model.disable();
|
||||||
baseband::shutdown();
|
baseband::shutdown();
|
||||||
}
|
}
|
||||||
|
|
@ -205,6 +213,9 @@ void SearchView::do_detection() {
|
||||||
|
|
||||||
locked = true;
|
locked = true;
|
||||||
locked_bin = bin_max;
|
locked_bin = bin_max;
|
||||||
|
if (pmem::beep_on_packets()) {
|
||||||
|
baseband::request_audio_beep(1000, 24000, 60);
|
||||||
|
}
|
||||||
// TODO: open Audio.
|
// TODO: open Audio.
|
||||||
} else
|
} else
|
||||||
text_infos.set("Out of range");
|
text_infos.set("Out of range");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue