diff options
author | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 10:05:59 +0900 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 10:05:59 +0900 |
commit | aec60d224c5cd4c875c1b9d8271bd521e781f324 (patch) | |
tree | 85f53b1ab229895a4f15833e537c7ef828e0e165 | |
parent | 795d2a07dedf3b0e89548effbf619d12de18ef0b (diff) |
for 2CHPP CH2 delay cal, use existing parameters
-rw-r--r-- | device-functions.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/device-functions.c b/device-functions.c index 5be0be3..838dd7a 100644 --- a/device-functions.c +++ b/device-functions.c @@ -2021,7 +2021,10 @@ int Set_Cal_Nom(int channel,int calibration_point_number,int parameter, float *n case pwl_delay_values: nominal_val=globals.Flash.delay_pwl_time[channel][range][polarity][entry]; nominal_wordout=globals.Flash.delay_pwl_Vc_norm4095[channel][range][polarity][entry]; - reset_state=disable_errors=1; + disable_errors=1; + if (!globals.Flash.volt_ctrl_delay[channel]) { + reset_state=1; + } break; case pwl_period_values: nominal_val=globals.Flash.period_pwl_time[channel][range][polarity][entry]; @@ -2050,8 +2053,9 @@ int Set_Cal_Nom(int channel,int calibration_point_number,int parameter, float *n return OK; } - /* For timing parameters, turn off output and error-checking, and change prf/pw */ - /* For ampl/os parameters, use existing timing and output state, and use error-checking */ + /* For timing parameters, turn off output and error-checking, and change prf/pw, + except for voltage-controlled delay (2CHPP, for example). For ampl/os parameters, + and voltage-controlled delay, use existing timing and output state, and use error-checking */ if (reset_state) { Main_Rst(); @@ -2102,9 +2106,11 @@ int Set_Cal_Nom(int channel,int calibration_point_number,int parameter, float *n globals.Flash.propagation_delay[channel]=0.0; globals.Flash.delay_shrink[channel]=0.0; - globals.ChannelState[channel].test_delay_mode=YES; - - status=Set_frequency(0,0,0,globals.Flash.ChanKey_frequency?channel:0,other_setting); + if (reset_state) { + // skipped for voltage-controlled delay (2CHPP) + globals.ChannelState[channel].test_delay_mode=YES; + status=Set_frequency(0,0,0,globals.Flash.ChanKey_frequency?channel:0,other_setting); + } if (!status) { status=Set_Delay(0,nominal_wordout,range,channel,nominal_val); } |