Skip to content

Commit

Permalink
Revert "add dequeue timeout for openhd"
Browse files Browse the repository at this point in the history
This reverts commit c63b02e.
  • Loading branch information
Consti10 committed Sep 27, 2023
1 parent ba11f70 commit 17c10f0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
6 changes: 1 addition & 5 deletions src/WBStreamTx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void WBStreamTx::loop_process_data() {
if(options.dequeue_thread_max_realtime){
SchedulingHelper::setThreadParamsMaxRealtime();
}
const std::int64_t timeout_usecs=std::chrono::duration_cast<std::chrono::microseconds>(options.dequeue_timeout).count();
static constexpr std::int64_t timeout_usecs=100*1000;
if(options.enable_fec){
std::shared_ptr<EnqueuedBlock> frame= nullptr;
while (m_process_data_thread_run){
Expand Down Expand Up @@ -159,10 +159,6 @@ void WBStreamTx::loop_process_data() {
m_queue_time_calculator.reset();
}
process_enqueued_packet(*packet);
}else{
if(options.dequeue_timeout_cb){
options.dequeue_timeout_cb(*this);
}
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions src/WBStreamTx.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*/
class WBStreamTx {
public:
typedef std::function<void(WBStreamTx& self)> DEQUEUE_TIMEOUT_CB;
struct Options {
// needs to match the radio port of the corresponding rx
uint8_t radio_port = 0;
Expand All @@ -46,10 +45,6 @@ class WBStreamTx {
std::shared_ptr<spdlog::logger> opt_console=nullptr;
// set sched_param = max realtime on the thread that dequeues and injects the packets
bool dequeue_thread_max_realtime= true;
// Dirty, for openhd - function that is called from the dequeue thread every time the
// de-queueing of a packet timed out (no packet was fed for timeout ms)
std::chrono::microseconds dequeue_timeout=std::chrono::milliseconds(100);
DEQUEUE_TIMEOUT_CB dequeue_timeout_cb= nullptr;
};
WBStreamTx(std::shared_ptr<WBTxRx> txrx,Options options,std::shared_ptr<RadiotapHeaderHolder> radiotap_header_holder);
WBStreamTx(const WBStreamTx&) = delete;
Expand Down

0 comments on commit 17c10f0

Please sign in to comment.