Enable radio stats in sensor cgi as default

This commit is contained in:
dak664 2010-02-26 21:38:57 +00:00
parent 844b3a34f7
commit 5debc183a9
3 changed files with 39 additions and 21 deletions

View file

@ -6,12 +6,14 @@
#include <avr/io.h>
#include <avr/interrupt.h>
/* Experimental: RADIOSTATS should be also be defined in the radio driver and webserver */
#define RADIOSTATS 0
/* RADIOSTATS should be also be defined in the radio driver and webserver */
#if RF230BB && WEBSERVER
#define RADIOSTATS 1
#endif
#if RADIOSTATS
static volatile clock_time_t count, scount, rcount;
volatile unsigned long seconds,radioontime;
extern uint8_t RF230_radio_on;
extern uint8_t RF230_receive_on;
#else
static volatile clock_time_t count, scount;
volatile unsigned long seconds;
@ -27,7 +29,7 @@ ISR(AVR_OUTPUT_COMPARE_INT)
seconds++;
}
#if RADIOSTATS
if (RF230_radio_on) {
if (RF230_receive_on) {
if (++rcount == CLOCK_SECOND) {
rcount=0;
radioontime++;