mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 02:17:39 +00:00
Workaround for Capture startup hang (#1285)
* Attempt to fix Capture startup hang * Pump baseband_queue on M4 startup * Synchronization experiment * Moved SpectrumCapture member, better hang detection for M0 * Prevent execute from working on members until class has been initialized. * Formatting * Remove workaround. * Rebase on next
This commit is contained in:
@@ -308,13 +308,25 @@ WaterfallView::WaterfallView(const bool cursor) {
|
||||
}
|
||||
|
||||
void WaterfallView::on_show() {
|
||||
// TODO: Assert that baseband is not shutdown.
|
||||
baseband::spectrum_streaming_start();
|
||||
start();
|
||||
}
|
||||
|
||||
void WaterfallView::on_hide() {
|
||||
// TODO: Assert that baseband is not shutdown.
|
||||
baseband::spectrum_streaming_stop();
|
||||
stop();
|
||||
}
|
||||
|
||||
void WaterfallView::start() {
|
||||
if (!running_) {
|
||||
baseband::spectrum_streaming_start();
|
||||
running_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
void WaterfallView::stop() {
|
||||
if (running_) {
|
||||
baseband::spectrum_streaming_stop();
|
||||
running_ = false;
|
||||
}
|
||||
}
|
||||
|
||||
void WaterfallView::show_audio_spectrum_view(const bool show) {
|
||||
|
@@ -131,11 +131,14 @@ class WaterfallView : public View {
|
||||
WaterfallView& operator=(const WaterfallView&) = delete;
|
||||
WaterfallView& operator=(WaterfallView&&) = delete;
|
||||
|
||||
// TODO: remove these, use start/stop directly instead.
|
||||
void on_show() override;
|
||||
void on_hide() override;
|
||||
|
||||
void set_parent_rect(const Rect new_parent_rect) override;
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
void set_parent_rect(const Rect new_parent_rect) override;
|
||||
void show_audio_spectrum_view(const bool show);
|
||||
|
||||
private:
|
||||
@@ -147,6 +150,7 @@ class WaterfallView : public View {
|
||||
|
||||
WaterfallWidget waterfall_widget{};
|
||||
FrequencyScale frequency_scale{};
|
||||
bool running_{false};
|
||||
|
||||
ChannelSpectrumFIFO* channel_fifo{nullptr};
|
||||
AudioSpectrum* audio_spectrum_data{nullptr};
|
||||
|
Reference in New Issue
Block a user