diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-19 14:52:04 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-19 14:52:04 -0400 |
commit | e9cadcbe020e0c2e3e85cabcc6a281bc869cbf33 (patch) | |
tree | d0fcc12f79be98f9e8ef9b69d43acba485899692 /device-functions.c | |
parent | 5f9bb3b7146d9453c56de73652ab213ca885c6e0 (diff) |
remove code with uninitialized gate_mode variable
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/device-functions.c b/device-functions.c index b52a6d5..e219bcf 100644 --- a/device-functions.c +++ b/device-functions.c @@ -1008,34 +1008,23 @@ int Set_Trig_Source(int channel,int mode) mode=source_external; } - + gate_mode = 0; if (mode==source_internal) { - gate_mode=0; /* frequency is automatically lowered if pw or delay have been changed to conflicting */ /* settings while in a non-internal mode */ globals.Registers.shift_reg_out[0] = (globals.Registers.shift_reg_out[0] & 0xe3) | 0; } else if (mode==source_external) { - gate_mode=0; globals.ChannelState[channel].hold_setting=hold_width; globals.Registers.shift_reg_out[0] = (globals.Registers.shift_reg_out[0] & 0xe3) | 3<<2; } else if (mode==source_manual) { - gate_mode=0; globals.ChannelState[channel].hold_setting=hold_width; globals.Registers.shift_reg_out[0] = (globals.Registers.shift_reg_out[0] & 0xe3) | 1<<2; } else if (mode==source_hold) { gate_mode=1; } else if (mode==source_immediate) { - if (gate_mode==1) { - globals.Registers.shift_reg_out[0] = (globals.Registers.shift_reg_out[0] & 0xe3) | 4<<2; - Main_update_shift_registers(); - gate_mode=0; /* allow triggering */ - bus_setpin(O_GATE, gate_mode); - globals.Registers.shift_reg_out[0] = (globals.Registers.shift_reg_out[0] & 0xe3) | 7<<2; - } else { - globals.Registers.shift_reg_out[0] = (globals.Registers.shift_reg_out[0] & 0xe3) | 4<<2; - Main_update_shift_registers(); - globals.Registers.shift_reg_out[0] = (globals.Registers.shift_reg_out[0] & 0xe3) | 7<<2; - } + globals.Registers.shift_reg_out[0] = (globals.Registers.shift_reg_out[0] & 0xe3) | 4<<2; + Main_update_shift_registers(); + globals.Registers.shift_reg_out[0] = (globals.Registers.shift_reg_out[0] & 0xe3) | 7<<2; } Main_update_shift_registers(); |