summaryrefslogtreecommitdiff
path: root/error_utils.c
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:25:12 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:25:12 +0900
commit264c6aa00dd50c83cb2f4be0849a0f7a4911b6a4 (patch)
tree49e8b2088a1f9b8ce4997a583f6fc1ffd8de0b4b /error_utils.c
parente12558f1ed16d3bdb96f7f0fbd05b48eb7558a0e (diff)
simplified YES/NO logic
Diffstat (limited to 'error_utils.c')
-rw-r--r--error_utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/error_utils.c b/error_utils.c
index 7d4dc25..c036556 100644
--- a/error_utils.c
+++ b/error_utils.c
@@ -822,7 +822,7 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
report_error=freq_lower_limit;
}
- if ((ChannelStateToTest[i].inverted!=NO) && (globals.Flash.min_pw[i]>0.0)) {
+ if ((ChannelStateToTest[i].inverted==YES) && (globals.Flash.min_pw[i]>0.0)) {
temp=(1/ChannelStateToTest[i].pw)*( 1.0- ampl_fixed_max_duty/duty_scale );
if (temp>globals.Constraints.err_min_freq[i]) {
globals.Constraints.err_min_freq[i]=temp;
@@ -943,7 +943,7 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
/* negative-pw units are special, ignore PRF / duty cycle / PW conflicts */
if (globals.Constraints.err_min_pw[i]>=0.0) {
if (ChannelStateToTest[i].trigger_source==source_internal) {
- if (ChannelStateToTest[i].inverted!=NO) {
+ if (ChannelStateToTest[i].inverted==YES) {
temp=(1/ChannelStateToTest[i].frequency)*( 1.0 - ampl_fixed_max_duty/duty_scale );
if (temp>globals.Constraints.err_min_pw[i]) {
globals.Constraints.err_min_pw[i]=temp;
@@ -1250,7 +1250,7 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
}
duty_cycle=ChannelStateToTest[i].pw*ChannelStateToTest[i].frequency*100; /* calculate duty cycle */
- if (ChannelStateToTest[i].inverted!=NO) {
+ if (ChannelStateToTest[i].inverted==YES) {
duty_cycle=100-duty_cycle; /* account for inversion */
}