From df095b947c630eefdd41bb9e1bd1e27121e506c6 Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Thu, 8 Aug 2013 15:22:44 -0400 Subject: rename ab_mode vars to pw_ctrl_mode, and remove ab_mode chankey --- device-functions.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'device-functions.c') diff --git a/device-functions.c b/device-functions.c index f25a62d..ba9459d 100644 --- a/device-functions.c +++ b/device-functions.c @@ -99,7 +99,7 @@ void Main_Rst (void) globals.ChannelState[i].zout=globals.Flash.zout_min[i]; globals.ChannelState[i].hold_setting = hold_width; globals.ChannelState[i].double_pulse = double_off; - globals.ChannelState[i].ab_mode = pw_normal; + globals.ChannelState[i].pw_ctrl_mode = pw_normal; globals.ChannelState[i].func_mode = pulse_mode_on; globals.ChannelState[i].polarity = globals.Flash.invert_by_default[i]; globals.ChannelState[i].output_state = output_off; @@ -129,7 +129,7 @@ void Main_Rst (void) Set_frequency(0,0,0,i,globals.ChannelState[i].frequency); Set_Delay(0,0,0,i,globals.ChannelState[i].delay); Set_Double(i,globals.ChannelState[i].double_pulse); - Set_Pwmode(i,globals.ChannelState[i].ab_mode); + Set_Pwmode(i,globals.ChannelState[i].pw_ctrl_mode); Set_Func(i,globals.ChannelState[i].func_mode); Set_Pol(i,globals.ChannelState[i].polarity); Set_Gate_Sync(i,globals.ChannelState[i].gate_type); @@ -847,9 +847,9 @@ void Set_Mux(int channel) mux_out=4; } else if (globals.ChannelState[channel].func_mode==dc_mode_on && globals.ChannelState[channel].polarity!=pol_norm) { mux_out=5; - } else if (globals.ChannelState[channel].ab_mode==pw_normal && globals.ChannelState[channel].polarity==pol_norm) { + } else if (globals.ChannelState[channel].pw_ctrl_mode==pw_normal && globals.ChannelState[channel].polarity==pol_norm) { mux_out=2; - } else if (globals.ChannelState[channel].ab_mode==pw_normal && globals.ChannelState[channel].polarity!=pol_norm) { + } else if (globals.ChannelState[channel].pw_ctrl_mode==pw_normal && globals.ChannelState[channel].polarity!=pol_norm) { mux_out=3; } else if (globals.ChannelState[channel].polarity==pol_norm) { mux_out=0; @@ -1026,7 +1026,7 @@ int Set_Output_State(int channel,int mode) int Set_Trig_Source(int channel,int mode) { int gate_mode; - int use_ab_mode; + int use_pw_ctrl_mode; int reset_freq; float use_freq; @@ -1035,7 +1035,7 @@ int Set_Trig_Source(int channel,int mode) return InvalidChannel; } - use_ab_mode = globals.ChannelState[channel].ab_mode; + use_pw_ctrl_mode = globals.ChannelState[channel].pw_ctrl_mode; use_freq = globals.ChannelState[channel].frequency; reset_freq = 0; @@ -1049,10 +1049,10 @@ int Set_Trig_Source(int channel,int mode) if ((globals.ChannelState[channel].trigger_source != source_hold) && (mode != source_hold)) { reset_freq = 1; use_freq = globals.Flash.min_freq[channel]; - use_ab_mode = pw_normal; + use_pw_ctrl_mode = pw_normal; } - TestState[channel].ab_mode = use_ab_mode; + TestState[channel].pw_ctrl_mode = use_pw_ctrl_mode; TestState[channel].frequency = use_freq; if ((error_num=Error_check(TestState))) { @@ -1061,7 +1061,7 @@ int Set_Trig_Source(int channel,int mode) if (reset_freq) { Set_frequency(0,0,0,channel,use_freq); - Set_Pwmode(channel,use_ab_mode); + Set_Pwmode(channel,use_pw_ctrl_mode); } } @@ -1374,7 +1374,7 @@ int Set_Pwmode(int channel,int mode) return AB_Mode_Error; } - globals.ChannelState[channel].ab_mode=mode; + globals.ChannelState[channel].pw_ctrl_mode=mode; Set_Mux(0); Set_Update_Chans(); @@ -1426,8 +1426,8 @@ int Set_Update_Chans(void) if (!globals.Flash.ChanKey_double_pulse) for (i=1; i> 1) & 1; globals.ChannelState[i].double_pulse = (temp >> 2) & 1; - globals.ChannelState[i].ab_mode = (temp >> 3) & 1; - /* one bit removed */ + globals.ChannelState[i].pw_ctrl_mode = (temp >> 3) & 3; globals.ChannelState[i].polarity = (temp >> 5) & 1; globals.ChannelState[i].output_state = (temp >> 6) & 1; globals.ChannelState[i].gate_type = (temp >> 7) & 1; @@ -4485,7 +4484,7 @@ void Set_Rcl(int setting_num) Set_Pw(0,0,0,i,globals.ChannelState[i].pw,0); Set_Double(i,globals.ChannelState[i].double_pulse); - Set_Pwmode(i,globals.ChannelState[i].ab_mode); + Set_Pwmode(i,globals.ChannelState[i].pw_ctrl_mode); Set_Func(i,globals.ChannelState[i].func_mode); Set_Pol(i,globals.ChannelState[i].polarity); @@ -4564,7 +4563,7 @@ void Set_Sav(int setting_num) globals.ChannelState[i].zout 50 (1) or min (0) globals.ChannelState[i].hold_setting hold_width 0, hold_duty 1 globals.ChannelState[i].double_pulse double_on 1, double_off 0 - globals.ChannelState[i].ab_mode pw_normal 1, pw_in_out 0 + globals.ChannelState[i].pw_ctrl_mode pw_normal 1, pw_in_out 0 globals.ChannelState[i].func_mode pulse_mode_on 0, dc_mode_on 1 globals.ChannelState[i].polarity pol_norm 0, pol_complement 1 globals.ChannelState[i].output_state output_off 0,output_on 1 @@ -4582,8 +4581,7 @@ void Set_Sav(int setting_num) } temp |= globals.ChannelState[i].hold_setting << 1; temp |= globals.ChannelState[i].double_pulse << 2; - temp |= globals.ChannelState[i].ab_mode << 3; - /* removed one bit */ + temp |= globals.ChannelState[i].pw_ctrl_mode << 3; temp |= globals.ChannelState[i].polarity << 5; temp |= globals.ChannelState[i].output_state << 6; temp |= globals.ChannelState[i].gate_type << 7; -- cgit