Remove baseband::start()/stop() and related message.

This commit is contained in:
Jared Boone 2016-07-19 17:06:22 -07:00
parent 3c46abdb24
commit 74b5571e8b
8 changed files with 0 additions and 61 deletions

View File

@ -308,12 +308,6 @@ AISAppView::AISAppView(NavigationView&) {
1,
});
baseband::start({
.mode = 3,
.sampling_rate = sampling_rate,
.decimation_factor = 1,
});
options_channel.on_change = [this](size_t, OptionsField::value_t v) {
this->on_frequency_changed(v);
};
@ -333,7 +327,6 @@ AISAppView::AISAppView(NavigationView&) {
}
AISAppView::~AISAppView() {
baseband::stop();
radio::disable();
baseband::shutdown();

View File

@ -78,18 +78,6 @@ void WFMConfig::apply() const {
audio::set_rate(audio::Rate::Hz_48000);
}
void start(BasebandConfiguration configuration) {
BasebandConfigurationMessage message { configuration };
send_message(&message);
}
void stop() {
BasebandConfigurationMessage message {
.configuration = { },
};
send_message(&message);
}
static bool baseband_image_running = false;
void run_image(const portapack::spi_flash::image_tag_t image_tag) {

View File

@ -52,9 +52,6 @@ struct WFMConfig {
void apply() const;
};
void start(BasebandConfiguration configuration);
void stop();
void run_image(const portapack::spi_flash::image_tag_t image_tag);
void shutdown();

View File

@ -77,12 +77,6 @@ CaptureAppView::CaptureAppView(NavigationView& nav) {
1,
});
baseband::start({
.mode = toUType(ReceiverModel::Mode::Capture),
.sampling_rate = sampling_rate,
.decimation_factor = 1,
});
record_view.set_sampling_rate(sampling_rate / 8);
record_view.on_error = [&nav](std::string message) {
nav.display_modal("Error", message);
@ -90,7 +84,6 @@ CaptureAppView::CaptureAppView(NavigationView& nav) {
}
CaptureAppView::~CaptureAppView() {
baseband::stop();
radio::disable();
baseband::shutdown();

View File

@ -136,12 +136,6 @@ ERTAppView::ERTAppView(NavigationView&) {
1,
});
baseband::start({
.mode = 6,
.sampling_rate = sampling_rate,
.decimation_factor = 1,
});
logger = std::make_unique<ERTLogger>();
if( logger ) {
logger->append("ert.txt");
@ -149,7 +143,6 @@ ERTAppView::ERTAppView(NavigationView&) {
}
ERTAppView::~ERTAppView() {
baseband::stop();
radio::disable();
baseband::shutdown();

View File

@ -154,7 +154,6 @@ void ReceiverModel::enable() {
void ReceiverModel::disable() {
enabled_ = false;
update_antenna_bias();
baseband::stop();
// TODO: Responsibility for enabling/disabling the radio is muddy.
// Some happens in ReceiverModel, some inside radio namespace.
@ -225,13 +224,9 @@ void ReceiverModel::update_baseband_configuration() {
// protocols that need quick RX/TX turn-around.
// Disabling baseband while changing sampling rates seems like a good idea...
baseband::stop();
radio::set_baseband_rate(sampling_rate() * baseband_oversampling());
update_tuning_frequency();
radio::set_baseband_decimation_by(baseband_oversampling());
baseband::start(baseband_configuration);
}
void ReceiverModel::update_headphone_volume() {

View File

@ -187,12 +187,6 @@ TPMSAppView::TPMSAppView(NavigationView&) {
1,
});
baseband::start({
.mode = 5,
.sampling_rate = sampling_rate,
.decimation_factor = 1,
});
options_band.on_change = [this](size_t, OptionsField::value_t v) {
this->on_band_changed(v);
};
@ -205,7 +199,6 @@ TPMSAppView::TPMSAppView(NavigationView&) {
}
TPMSAppView::~TPMSAppView() {
baseband::stop();
radio::disable();
baseband::shutdown();

View File

@ -51,7 +51,6 @@ public:
ChannelStatistics = 2,
DisplayFrameSync = 3,
AudioStatistics = 4,
BasebandConfiguration = 5,
TPMSPacket = 6,
Shutdown = 8,
AISPacket = 7,
@ -213,18 +212,6 @@ struct BasebandConfiguration {
}
};
class BasebandConfigurationMessage : public Message {
public:
constexpr BasebandConfigurationMessage(
const BasebandConfiguration& configuration
) : Message { ID::BasebandConfiguration },
configuration { configuration }
{
}
BasebandConfiguration configuration;
};
class SpectrumStreamingConfigMessage : public Message {
public:
enum class Mode : uint32_t {