mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-12 11:42:13 -04: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
1 changed files with 2 additions and 8 deletions
|
@ -38,8 +38,7 @@ using namespace hackrf::one;
|
||||||
class StreamOutput {
|
class StreamOutput {
|
||||||
public:
|
public:
|
||||||
StreamOutput(
|
StreamOutput(
|
||||||
FIFO<uint8_t>* const fifo
|
) : fifo { reinterpret_cast<FIFO<uint8_t>*>(shared_memory.FIFO_HACK) }
|
||||||
) : fifo { fifo }
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,12 +103,7 @@ private:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto fifo = reinterpret_cast<FIFO<uint8_t>*>(shared_memory.FIFO_HACK);
|
StreamOutput stream;
|
||||||
if( !fifo ) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
StreamOutput stream { fifo };
|
|
||||||
|
|
||||||
while( !chThdShouldTerminate() ) {
|
while( !chThdShouldTerminate() ) {
|
||||||
chEvtWaitAny(EVT_FIFO_HIGHWATER);
|
chEvtWaitAny(EVT_FIFO_HIGHWATER);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue