POCSAG address filter now ignores alpha messages

Experimenting with FIFOs for replay...
This commit is contained in:
furrtek 2017-04-19 22:05:16 +01:00
parent a053c0e234
commit 40b49e2072
20 changed files with 120 additions and 69 deletions

View file

@ -25,8 +25,12 @@
#include "baseband_api.hpp"
#include "buffer_exchange.hpp"
// DEBUG:
#include "hackrf_gpio.hpp"
using namespace hackrf::one;
struct BasebandReplay {
BasebandReplay(CaptureConfig* const config) {
BasebandReplay(ReplayConfig* const config) {
baseband::replay_start(config);
}
@ -63,13 +67,13 @@ ReplayThread::~ReplayThread() {
msg_t ReplayThread::static_fn(void* arg) {
auto obj = static_cast<ReplayThread*>(arg);
const auto error = obj->run();
if( error.is_valid() && obj->error_callback ) {
/*if( error.is_valid() && obj->error_callback ) {
obj->error_callback(error.value());
} else {
if( obj->success_callback ) {
obj->success_callback();
}
}
}*/
return 0;
}
@ -78,12 +82,15 @@ Optional<File::Error> ReplayThread::run() {
BufferExchange buffers { &config };
while( !chThdShouldTerminate() ) {
auto buffer = buffers.get();
auto read_result = reader->read(buffer->data(), buffer->size());
//auto buffer = buffers.get();
buffers.get();
/*auto read_result = reader->read(buffer->data(), buffer->size());
if( read_result.is_error() ) {
return read_result.error();
}
buffers.put(buffer);
buffers.put(buffer);*/
chThdSleep(50);
//led_tx.toggle();
}
return { };