mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-28 16:59:47 -05:00
Revise CaptureThread loop to not get stuck if SD write speed too slow.
This commit is contained in:
parent
f250f30ada
commit
4a348e2c6c
@ -134,12 +134,12 @@ private:
|
||||
StreamOutput stream { write_size_log2, buffer_count_log2 };
|
||||
|
||||
while( !chThdShouldTerminate() ) {
|
||||
chEvtWaitAny(EVT_MASK_CAPTURE_THREAD);
|
||||
|
||||
while( stream.available() >= write_size ) {
|
||||
if( stream.available() >= write_size ) {
|
||||
if( !transfer(stream, write_buffer.get()) ) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
chEvtWaitAny(EVT_MASK_CAPTURE_THREAD);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user