summaryrefslogtreecommitdiff
path: root/error_utils.c
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 01:12:40 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 01:12:40 +0900
commit116329c5cd66eb153cc9aa5186276164046a4255 (patch)
treead69ded3d2658994df82ce3c298d5be8ce64a5ff /error_utils.c
parentbb884d8ad866d3bb2e18012fcb84f09ef8dd52a8 (diff)
fix duty cycle calculation when calibrating amplitude
Diffstat (limited to 'error_utils.c')
-rw-r--r--error_utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/error_utils.c b/error_utils.c
index 7cead90..cc08a3f 100644
--- a/error_utils.c
+++ b/error_utils.c
@@ -1025,6 +1025,9 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
}
/* ------------------------------- */
+ // calculate duty cycle for later use
+ duty_cycle=ChannelStateToTest[i].pw*ChannelStateToTest[i].frequency*100.0; /* calculate duty cycle */
+
/* disable amplitude checks if amplitude calibration is in progress */
if (!globals.Flags.extended_ampl_min_max) {
@@ -1128,7 +1131,6 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
}
}
- duty_cycle=ChannelStateToTest[i].pw*ChannelStateToTest[i].frequency*100; /* calculate duty cycle */
if (duty_cycle>(100.0*ampl_fixed_max_duty/duty_scale))
/* set at crossover voltage */
{