diff options
author | Mike <mjc@avtechpulse.com> | 2000-01-01 01:22:35 +0900 |
---|---|---|
committer | Mike <mjc@avtechpulse.com> | 2000-01-01 01:22:35 +0900 |
commit | 608cc506418375737ba53d520fabf905c19ca672 (patch) | |
tree | dab454adf6f386531ff26bfcec286ee63c5c3ad8 /globals.h | |
parent | 37097b33a4f0dbbf8d3b48d37416e6bec8b6b79e (diff) |
better monitor averaging (for AVO-8E3 S/N 13790) with auto-reset of average
Diffstat (limited to 'globals.h')
-rw-r--r-- | globals.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -350,6 +350,9 @@ typedef struct { } CalStruct; +#define CURR_MON_MAX_OLD_COUNTS 50 // monitor readings are around 50/sec, average over one second +#define MAX_STEP_DEV_FROM_AVG 5 // reset monitor average if more than N steps difference + typedef struct { float frequency; /* the global frequency variable */ float delay; /* the global delay variable */ @@ -361,6 +364,8 @@ typedef struct { /* not part of sav/rcl, generated by amplitude routines */ float Curr_Mon_value; /* current monitor reading */ + float old_mon_vals[CURR_MON_MAX_OLD_COUNTS]; /* for monitor averaging */ + int num_mon_vals; /* how many monitor readings are stored */ float displayed_mon_val; /* used to determine when LCD update is required */ int Curr_Mon_offset; /* current monitor ADC offset */ |