summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormjc <mjc@avtechpulse.com>2000-01-01 00:11:30 +0900
committermjc <mjc@avtechpulse.com>2000-01-01 00:11:30 +0900
commit5aa9a079d029cf6e63c4c8cf787585517c65a095 (patch)
tree7d4aa2b3ff279fcda7e727bbce1c8c4d947fe6e9
parentdfa2cf2ce9dfa09e34c1cab238d98a602c0789ec (diff)
self-cal needs at least 2 periods for PW cal measurement time
-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;
}