From b5939f89670461824697374eecf4fc904676cb74 Mon Sep 17 00:00:00 2001 From: gardners Date: Fri, 15 Feb 2013 06:16:03 +1030 Subject: [PATCH] display packet radio link budget periodically, even when debugging disabled. --- slip.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/slip.c b/slip.c index aa7c5e95..3bde5a42 100644 --- a/slip.c +++ b/slip.c @@ -79,6 +79,7 @@ int slip_encode(int format, } +unsigned long long last_rssi_report=0; int parse_rfd900_rssi(char *s) { int lrssi,rrssi,lnoise,rnoise,temp; @@ -91,8 +92,10 @@ int parse_rfd900_rssi(char *s) int rmargin=(lrssi-lnoise)/1.9; int maxmargin=lmargin; if (rmargin>maxmargin) maxmargin=rmargin; - if (config.debug.packetradio) - DEBUGF("Link budget = %ddB, temperature=%dC",maxmargin,temp); + if (config.debug.packetradio||(gettime_ms()-last_rssi_report>30000)) { + INFOF("Link budget = %ddB, temperature=%dC",maxmargin,temp); + last_rssi_report=gettime_ms(); + } } return 0;