diff options
author | Mike <mjc@avtechpulse.com> | 2000-01-01 00:15:35 +0900 |
---|---|---|
committer | Mike <mjc@avtechpulse.com> | 2000-01-01 00:15:35 +0900 |
commit | 22c7346e650ef4efb7071652c5130f5b752c868b (patch) | |
tree | 1c193432217513cf32bf2b192d5995f29bae9e4c | |
parent | 0a35518a74e55a03481fa20050ec20865bc35aea (diff) |
further refinements to ampl settling time, but need to make it dependent on size of DAC change?
-rw-r--r-- | device-functions.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/device-functions.c b/device-functions.c index 9c79d5e..a84b2cc 100644 --- a/device-functions.c +++ b/device-functions.c @@ -4760,7 +4760,7 @@ void Main_update_shift_registers() } - long sleep_us = 0; + gulong sleep_us = 0; /* keep trigger suppressed for a time (normally 0.5s) after a relay update */ if ( globals.Registers.last_relay_driver_settings[0]!=globals.Registers.shift_reg_out[2] @@ -4770,15 +4770,15 @@ void Main_update_shift_registers() } /* amplitude settling time after a change */ - if (globals.Flags.need_ampl_settling_time = YES) { + if (globals.Flags.need_ampl_settling_time == YES) { sleep_us = MAX(sleep_us, 1e6 * globals.Flash.amplitude_settling_time); } - if ((sleep_us < 0) || (sleep_us > 10e6)) { - sleep_us = 0; - } + /* limit to 5 seconds */ + sleep_us = MIN(sleep_us, 5e6); /* relay change and/or ampl settling time */ + g_print_debug("update sleep: %ld\n", sleep_us); g_usleep (sleep_us); /* restore output if required */ |