mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-28 08:49:45 -05:00
Hide FIFO hack inside StreamOutput.
First step in a long refactor and evolution of the capture code.
This commit is contained in:
parent
adf573be20
commit
8b8b394792
@ -38,8 +38,7 @@ using namespace hackrf::one;
|
||||
class StreamOutput {
|
||||
public:
|
||||
StreamOutput(
|
||||
FIFO<uint8_t>* const fifo
|
||||
) : fifo { fifo }
|
||||
) : fifo { reinterpret_cast<FIFO<uint8_t>*>(shared_memory.FIFO_HACK) }
|
||||
{
|
||||
}
|
||||
|
||||
@ -104,12 +103,7 @@ private:
|
||||
return false;
|
||||
}
|
||||
|
||||
auto fifo = reinterpret_cast<FIFO<uint8_t>*>(shared_memory.FIFO_HACK);
|
||||
if( !fifo ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
StreamOutput stream { fifo };
|
||||
StreamOutput stream;
|
||||
|
||||
while( !chThdShouldTerminate() ) {
|
||||
chEvtWaitAny(EVT_FIFO_HIGHWATER);
|
||||
|
Loading…
Reference in New Issue
Block a user