summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */
{