mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-10-17 17:35:18 +00:00
Replay buffer size and samplerate adjustment
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
//TEST: Check AFSK transmit end, skips last bits ?
|
||||
//TEST: Imperial in whipcalc
|
||||
|
||||
//BUG: CPLD-related rx ok, tx bad, see portapack.cpp lines 214+ to disable CPLD overlay
|
||||
//BUG: REPLAY See what's wrong with quality (format, or need for interpolation filter ?)
|
||||
//TODO: REPLAY Convert C16 to C8 on M0 core
|
||||
//BUG: SCANNER Lock on frequency, if frequency jump, still locked on first one
|
||||
//BUG: SCANNER Multiple slices
|
||||
//BUG: REPLAY freezes when SD card not present
|
||||
|
@@ -25,10 +25,6 @@
|
||||
#include "baseband_api.hpp"
|
||||
#include "buffer_exchange.hpp"
|
||||
|
||||
// DEBUG:
|
||||
#include "hackrf_gpio.hpp"
|
||||
using namespace hackrf::one;
|
||||
|
||||
struct BasebandReplay {
|
||||
BasebandReplay(ReplayConfig* const config) {
|
||||
baseband::replay_start(config);
|
||||
@@ -90,10 +86,7 @@ Optional<File::Error> ReplayThread::run() {
|
||||
return read_result.error();
|
||||
}
|
||||
|
||||
if (!buffers.put(buffer))
|
||||
for(;;){}; // DEBUG
|
||||
|
||||
led_tx.toggle(); // DEBUG
|
||||
buffers.put(buffer);
|
||||
}
|
||||
|
||||
return { };
|
||||
|
@@ -91,7 +91,7 @@ void ReplayView::set_file_list(const std::vector<std::filesystem::path>& file_li
|
||||
|
||||
for (const auto& file : file_list) {
|
||||
bbd_file.open("/" + file.string());
|
||||
duration = bbd_file.size() / (2 * 2 * (sampling_rate / 8));
|
||||
duration = bbd_file.size() / (2 * 2 * sampling_rate / 4);
|
||||
file_options.emplace_back(file.string().substr(0, 8), duration);
|
||||
}
|
||||
options_files.set_options(file_options);
|
||||
|
@@ -59,7 +59,7 @@ private:
|
||||
using option_t = std::pair<std::string, int32_t>;
|
||||
using options_t = std::vector<option_t>;
|
||||
|
||||
static constexpr uint32_t sampling_rate = 1000000;
|
||||
static constexpr uint32_t sampling_rate = 4000000;
|
||||
|
||||
void toggle();
|
||||
|
||||
|
Reference in New Issue
Block a user