diff options
author | Mike <mjc@avtechpulse.com> | 2000-01-01 01:12:40 +0900 |
---|---|---|
committer | Mike <mjc@avtechpulse.com> | 2000-01-01 01:12:40 +0900 |
commit | 116329c5cd66eb153cc9aa5186276164046a4255 (patch) | |
tree | ad69ded3d2658994df82ce3c298d5be8ce64a5ff /error_utils.c | |
parent | bb884d8ad866d3bb2e18012fcb84f09ef8dd52a8 (diff) |
fix duty cycle calculation when calibrating amplitude
Diffstat (limited to 'error_utils.c')
-rw-r--r-- | error_utils.c | 4 |
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 */ { |