diff options
author | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 21:24:39 -0500 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 21:24:39 -0500 |
commit | e3fe9a65f8ebbbbb7fffe65f79ffb235bbb8b029 (patch) | |
tree | 3701a7c33e4c9edaa23e4121bd0bcebb69031efb | |
parent | 34d36d25864d90103cafa363035424e8bf01fad3 (diff) |
add config option to force monotonic TRIG-OUT delay when externally triggered.
-rw-r--r-- | device-functions.c | 9 | ||||
-rw-r--r-- | error_utils.c | 8 | ||||
-rw-r--r-- | flash.c | 2 | ||||
-rw-r--r-- | globals.h | 5 |
4 files changed, 23 insertions, 1 deletions
diff --git a/device-functions.c b/device-functions.c index ee62cf1..69d94fa 100644 --- a/device-functions.c +++ b/device-functions.c @@ -757,7 +757,7 @@ int Set_Delay(int check_possible_only,int word_override,int range_override,int c /* won't work for all values if apparent fixed delay is less than minimum variable delay */ min_one_shot_delay = globals.Flash.delay_pwl_time[channel][0][0][0]; if (globals.Flash.delay_shrink[channel] < min_one_shot_delay) { - return HardwareError; + return DelayRangeError; } /* If we need the advance mode for all positive values of delay (for the external trigger @@ -775,6 +775,13 @@ int Set_Delay(int check_possible_only,int word_override,int range_override,int c SYNC pulse. */ + if ( globals.Flash.force_monotonic_ext_trig_delay[channel] && // specials mostly + (globals.Flash.delay_shrink[channel] > 0.0) && // ignore if delay shrink cal not set + (globals.Flash.propagation_delay[channel] > 0.0) && + ((globals.Flash.delay_shrink[channel] - globals.Flash.propagation_delay[channel]) < min_one_shot_delay)) { + return ExternalModeDelayError; + } + /* tweak depending on polarity */ adj_setting = set_delay; diff --git a/error_utils.c b/error_utils.c index 503724d..eb5d337 100644 --- a/error_utils.c +++ b/error_utils.c @@ -484,6 +484,14 @@ void get_error_text(gchar **response, int error_num) format_error_text(response,-240,"Not possible with the current PW distortion settings."); break; + case DelayRangeError: + format_error_text(response,-240,"Gap in possible delay values."); + break; + + case ExternalModeDelayError: + format_error_text(response,-240,"TRIG-OUT delay not monotonic, boost fixed delay or sync delay."); + break; + case burst_duty_error: format_error_text(response,-222,"Duty cycle inside burst is too high."); break; @@ -802,6 +802,8 @@ static void initFlashValues(FlashStruct *mem) } mem->atten_percent_max_ampl[i] = 0.93; + + mem->force_monotonic_ext_trig_delay[i] = 0; } mem->relay_delay_in_sec=0.5; @@ -88,6 +88,8 @@ #define NetworkNotFound 74 #define ThisShouldntHappen 75 #define Startup_Not_Finished 76 +#define DelayRangeError 77 +#define ExternalModeDelayError 78 #define YES 1 #define NO 0 @@ -719,6 +721,9 @@ typedef struct { char ignore_ampl_polarity[max_channels]; /* addr 10148, for AVR-D3-B-MS1 CH2 */ char I2C_port_for_CH2_delay; /* addr 10150, for AVIR-2-B-PN-DP-KMPC-VXI */ + char sparex4; + + char force_monotonic_ext_trig_delay[max_channels]; /* addr 10152 - maybe for AVL-5-B-PN-TR-DP-KMPD */ char flash_end; |