Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
default to flush interval of -1 (which means behaviour is exactly as …
Browse files Browse the repository at this point in the history
…it was without a flush interval before)
  • Loading branch information
Consti10 committed Dec 19, 2020
1 parent 737a965 commit 1f3d360
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ radio_loop(std::shared_ptr<Aggregator> agg,const std::vector<std::string> rxInte

if (rc == 0){
// timeout expired
// smaller than 0 means no flush enabled
if(flush_interval.count()>0){
agg->flushRxRing();
}
Expand All @@ -426,6 +427,7 @@ int main(int argc, char *const *argv) {
int opt;
uint8_t k = 8, n = 12, radio_port = 1;
std::chrono::milliseconds log_interval{1000};
// use -1 for no flush interval
std::chrono::milliseconds flush_interval{-1};
int client_udp_port = 5600;
std::string client_addr = "127.0.0.1";
Expand Down
1 change: 1 addition & 0 deletions src/tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ void WBTransmitter::loop() {
if(errno==EAGAIN || errno==EWOULDBLOCK){
// timeout
if(FLUSH_INTERVAL.count()>0){
// smaller than 0 means no flush enabled
finishCurrentBlock();
}
continue;
Expand Down

0 comments on commit 1f3d360

Please sign in to comment.