summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device-functions.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/device-functions.c b/device-functions.c
index b6df2af..83a384f 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -4154,24 +4154,24 @@ int I2C_Self_Cal(int channel, int meas_mode, float *meas, float target_time)
measuring_time = 1.0;
- min_time = globals.ChannelState[channel].pw * 3.0;
+ min_time = 3.0 * globals.ChannelState[channel].pw;
if (min_time > measuring_time) {
measuring_time = min_time;
}
- min_time = (1.0/globals.ChannelState[channel].frequency);
+ min_time = 2.0 / globals.ChannelState[channel].frequency;
if (min_time > measuring_time) {
measuring_time = min_time;
}
if (meas_mode == MEAS_PRF) {
- min_time = (1.0/globals.ChannelState[channel].frequency) * 3.0;
+ min_time = 3.0 / globals.ChannelState[channel].frequency;
if (min_time > measuring_time) {
measuring_time = min_time;
}
}
- min_time = fabs(globals.ChannelState[channel].delay) * 3.0;
+ min_time = 3.0 * fabs(globals.ChannelState[channel].delay);
if (min_time > measuring_time) {
measuring_time = min_time;
}