mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-11 17:19:29 +00:00
Beep on search find something.
Beep on search find something. Solves #2643
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user