summaryrefslogtreecommitdiff
path: root/error_utils.c
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:06:10 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:06:10 +0900
commit22d14fa90698c21b05d3eda2f65d7db9498e9a57 (patch)
treefeab6ce25e68f1645bce474e2a70c87c874d00cd /error_utils.c
parenta287b3611a8f6cd6bef0aa850930d3f6a5d9dbaf (diff)
enforce double pulse minimum spacingINSTRUMENT_6_2_30b
Diffstat (limited to 'error_utils.c')
-rw-r--r--error_utils.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/error_utils.c b/error_utils.c
index e0f6446..24a9af5 100644
--- a/error_utils.c
+++ b/error_utils.c
@@ -417,12 +417,12 @@ void get_error_text(gchar **response, int error_num)
format_error_text(response,-221,"Duty cycle can not be set. Set PW instead.");
break;
- case PW_Exceeds_Double_Separation:
- format_error_text(response,-221,"PW can not exceed double pulse separation.");
+ case Double_Separation_Too_Small:
+ format_error_text(response,-221,"Double pulse separation too small.");
break;
case Double_Separation_Too_Large:
- format_error_text(response,-221,"Double pulse separation is too high. It must be < 95% of the period.");
+ format_error_text(response,-221,"Double pulse separation too high.");
break;
case Cant_Do_Burst_and_Double:
@@ -947,11 +947,11 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
}
if (ChannelStateToTest[i].double_pulse==double_on) {
- temp=ChannelStateToTest[i].delay;
+ temp = (ChannelStateToTest[i].delay - globals.Flash.double_pulse_extra_deadtime[i]) / (1.0 + globals.Flash.double_pulse_extra_pw_margin[i]);
if (temp<globals.Constraints.err_max_pw[i]) {
globals.Constraints.err_max_pw[i]=temp;
if (ChannelStateToTest[i].pw>(1.001*globals.Constraints.err_max_pw[i])) {
- report_error=PW_Exceeds_Double_Separation;
+ report_error=Double_Separation_Too_Small;
}
}
}
@@ -1065,12 +1065,21 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
}
if (ChannelStateToTest[i].double_pulse==double_on) {
- temp=ChannelStateToTest[i].pw;
+ temp=globals.Flash.double_pulse_min_sep[i];
if (temp>globals.Constraints.err_min_delay[i]) {
globals.Constraints.err_min_delay[i]=temp;
if ( (globals.Constraints.err_min_delay[i]>=0.0 && ChannelStateToTest[i].delay<(0.999*globals.Constraints.err_min_delay[i]))
|| (globals.Constraints.err_min_delay[i]<0.0 && ChannelStateToTest[i].delay<(1.001*globals.Constraints.err_min_delay[i])) ) {
- report_error=PW_Exceeds_Double_Separation;
+ report_error=Double_Separation_Too_Small;
+ }
+ }
+
+ temp=ChannelStateToTest[i].pw * (1.0 + globals.Flash.double_pulse_extra_pw_margin[i]) + globals.Flash.double_pulse_extra_deadtime[i];
+ if (temp>globals.Constraints.err_min_delay[i]) {
+ globals.Constraints.err_min_delay[i]=temp;
+ if ( (globals.Constraints.err_min_delay[i]>=0.0 && ChannelStateToTest[i].delay<(0.999*globals.Constraints.err_min_delay[i]))
+ || (globals.Constraints.err_min_delay[i]<0.0 && ChannelStateToTest[i].delay<(1.001*globals.Constraints.err_min_delay[i])) ) {
+ report_error=Double_Separation_Too_Small;
}
}
}