diff options
-rw-r--r-- | device-functions.c | 3 | ||||
-rw-r--r-- | flash.c | 2 | ||||
-rw-r--r-- | globals.h | 6 |
3 files changed, 8 insertions, 3 deletions
diff --git a/device-functions.c b/device-functions.c index 2565a02..9f3a086 100644 --- a/device-functions.c +++ b/device-functions.c @@ -4222,7 +4222,8 @@ int I2C_Self_Cal(int channel, int meas_mode, float *meas, float target_time) continue; } - this = count * 100e-9; + this = count / get_bounded_float (globals.Flash.self_cal_ref_freq, SELF_CAL_REF_FREQ); + max_error = 0.001; avg = 0.0; @@ -517,6 +517,8 @@ static void initFlashValues(FlashStruct *mem) mem->prf_limiter=1; + mem->self_cal_ref_freq = SELF_CAL_REF_FREQ; + mem->pcb116c_mon=1; /* more recent ADC, different reading code */ mem->warn_even_if_output_off=0; @@ -230,7 +230,7 @@ // hardware default values #define DEFAULT_OUTPUT_ON_DELAY 0.8 // needs at least 800 ms, due to soft-on circuit - +#define SELF_CAL_REF_FREQ 1e7 // 10 MHz // menu stuff #define Main_Menu_On 0 @@ -464,7 +464,9 @@ typedef struct { char prf_limiter; /* 243 */ - char spare_padding[12]; /* 244 - padding between common and per-channel sections of the */ + float self_cal_ref_freq; /* 244 */ + + char spare_padding[8]; /* 248 - padding between common and per-channel sections of the */ /* flash eeprom. Adjust size if variables added to common section, */ /* so that per-channel section starts at 256 */ |