mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 19:57:42 +00:00
Fixed Sonde RSSI "Beep" (#2012)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
||||
* Copyright (C) 2017 Furrtek
|
||||
* Copyright (C) 2014 zilog80
|
||||
* Copyright (C) 2024 Mark Thompson
|
||||
*
|
||||
* This file is part of PortaPack.
|
||||
*
|
||||
@@ -88,9 +89,6 @@
|
||||
#include "message.hpp"
|
||||
#include "portapack_shared_memory.hpp"
|
||||
|
||||
#include "audio_output.hpp"
|
||||
#include "tone_gen.hpp"
|
||||
|
||||
#include "buffer.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
@@ -115,21 +113,10 @@ class SondeProcessor : public BasebandProcessor {
|
||||
private:
|
||||
static constexpr size_t baseband_fs = 2457600;
|
||||
|
||||
std::array<int16_t, 32> audio{};
|
||||
|
||||
const buffer_s16_t audio_buffer{
|
||||
(int16_t*)audio.data(),
|
||||
sizeof(audio) / sizeof(int16_t)};
|
||||
|
||||
AudioOutput audio_output{};
|
||||
|
||||
bool beep_play{false};
|
||||
bool silence_play{false};
|
||||
bool pitch_rssi_enabled{false};
|
||||
|
||||
uint32_t last_rssi{0};
|
||||
|
||||
ToneGen tone_gen{};
|
||||
uint32_t beep_freq{0};
|
||||
|
||||
std::array<complex16_t, 512> dst{};
|
||||
const buffer_c16_t dst_buffer{
|
||||
@@ -181,21 +168,6 @@ class SondeProcessor : public BasebandProcessor {
|
||||
baseband_fs, this, baseband::Direction::Receive, /*auto_start*/ false};
|
||||
RSSIThread rssi_thread{};
|
||||
|
||||
void play_beep();
|
||||
void stop_beep();
|
||||
|
||||
/**
|
||||
* Used for filling the audio buffer with the waveform
|
||||
* generated by the ToneGen class:
|
||||
*
|
||||
*/
|
||||
void generate_beep();
|
||||
|
||||
/**
|
||||
* Used for filling the audio buffer with silence:
|
||||
*/
|
||||
void generate_silence();
|
||||
|
||||
void pitch_rssi_config(const PitchRSSIConfigureMessage& message);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user