mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-06 08:45:01 -04:00
Hide baseband queue code inside baseband "API".
This commit is contained in:
parent
49a89b9dee
commit
22e44605b6
10 changed files with 195 additions and 122 deletions
|
@ -25,8 +25,7 @@
|
|||
|
||||
#include "string_format.hpp"
|
||||
|
||||
#include "portapack_shared_memory.hpp"
|
||||
using namespace portapack;
|
||||
#include "baseband_api.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
@ -352,12 +351,11 @@ AISAppView::AISAppView(NavigationView&) {
|
|||
1,
|
||||
});
|
||||
|
||||
BasebandConfigurationMessage message { {
|
||||
baseband::start({
|
||||
.mode = 3,
|
||||
.sampling_rate = sampling_rate,
|
||||
.decimation_factor = 1,
|
||||
} };
|
||||
shared_memory.baseband_queue.push(message);
|
||||
});
|
||||
|
||||
options_channel.on_change = [this](size_t, OptionsField::value_t v) {
|
||||
this->on_frequency_changed(v);
|
||||
|
@ -373,11 +371,7 @@ AISAppView::AISAppView(NavigationView&) {
|
|||
}
|
||||
|
||||
AISAppView::~AISAppView() {
|
||||
shared_memory.baseband_queue.push_and_wait(
|
||||
BasebandConfigurationMessage {
|
||||
.configuration = { },
|
||||
}
|
||||
);
|
||||
baseband::stop();
|
||||
radio::disable();
|
||||
|
||||
EventDispatcher::message_map().unregister_handler(Message::ID::AISPacket);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue