Commit 40c4c8e8 authored by Bruno Randolf's avatar Bruno Randolf

change select timeout so we dont get stuck on one channel longer than the

channel dwell time if we don't receive anything
parent 8a1a5d4d
......@@ -552,8 +552,8 @@ receive_any(void)
if (srv_fd != -1) {
FD_SET(srv_fd, &read_fds);
}
tv.tv_sec = 1;
tv.tv_usec = 0;
tv.tv_sec = 0;
tv.tv_usec = min(conf.channel_time, 1000000);
mfd = max(mon, srv_fd) + 1;
ret = select(mfd, &read_fds, &write_fds, &excpt_fds, &tv);
......
......@@ -84,7 +84,8 @@ kilo_mega_ize(unsigned int val);
#define TOGGLE_BIT(_x, _m) (_x) ^= (_m)
#define max(x,y) ((x) > (y) ? (x) : (y))
#define max(_x, _y) ((_x) > (_y) ? (_x) : (_y))
#define min(_x, _y) ((_x) < (_y) ? (_x) : (_y))
/* Fixed Point IIR Averaging Filter:
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment