From e9cadcbe020e0c2e3e85cabcc6a281bc869cbf33 Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Fri, 19 Oct 2012 14:52:04 -0400 Subject: remove code with uninitialized gate_mode variable --- device-functions.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'device-functions.c') 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(); -- cgit