summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:00:38 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:00:38 -0500
commit1f0814b74a8bb2a7554606a407620185819b08f6 (patch)
treeb74e62e7c7137f65638bb1cafe09191002a81e06 /device-functions.c
parent6909a50a3cf11ccfcf111f54e848347fb7bdcd0a (diff)
boost "fixed" pw only in calibration mode
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/device-functions.c b/device-functions.c
index 5379741..9cd490e 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -463,21 +463,24 @@ int Set_Pw(int check_possible_only,int word_override,int range_override,int chan
// but triggers following stages.
word_out=globals.Flash.fix_pw_dac_val[channel];
- // Also, boost the internal PW range so that PRF calibration works at
+ // Also, boost the internal PW range during calibration
+ // so that PRF calibration works at
// low PRFs (i.e., reasonable duty cycle for scope to see).
// Bit of a hack based on the period.
- int rough_range = ((int) log10 (1.0/globals.ChannelState[channel].frequency)) + 6;
- if (rough_range < 0) {
- rough_range = 0;
- }
- if (rough_range >= timing_ranges) {
- rough_range = timing_ranges-1;
+ if (globals.Flash.fully_programmed==Being_Programmed) {
+ int rough_range = ((int) log10 (1.0/globals.ChannelState[channel].frequency)) + 6;
+ if (rough_range < 0) {
+ rough_range = 0;
+ }
+ if (rough_range >= timing_ranges) {
+ rough_range = timing_ranges-1;
+ }
+ if (rough_range==0) {
+ cap_range_control=0;
+ } else {
+ cap_range_control = 1 << (rough_range-1);
+ }
}
- if (rough_range==0) {
- cap_range_control=0;
- } else {
- cap_range_control = 1 << (rough_range-1);
- }
/* Zout hardware/software is used in AVPP to control PW ranges in the
* external circuitry, not Zout */