From bee40b77fc98991b4b6ef33b1e738915bc989ff0 Mon Sep 17 00:00:00 2001 From: Mike Date: Sat, 1 Jan 2000 00:17:35 +0900 Subject: rename "polarity" variables to "inverted" for clarity --- device-functions.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'device-functions.c') diff --git a/device-functions.c b/device-functions.c index a13deb5..9f9c012 100644 --- a/device-functions.c +++ b/device-functions.c @@ -153,7 +153,7 @@ void Main_Rst (void) globals.ChannelState[i].double_pulse = double_off; 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].inverted = globals.Flash.invert_by_default[i]; globals.ChannelState[i].output_state = output_off; globals.ChannelState[i].gate_type = gate_sync; globals.ChannelState[i].trigger_source = source_internal; @@ -180,7 +180,7 @@ void Main_Rst (void) Set_Double(i,globals.ChannelState[i].double_pulse); 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_Inverted(i,globals.ChannelState[i].inverted); Set_Gate_Sync(i,globals.ChannelState[i].gate_type); Set_Gate_Level(i,globals.ChannelState[i].gate_level); Set_EA(i,globals.ChannelState[i].amp_mode); @@ -1001,17 +1001,17 @@ void Set_Mux(int channel) { int mux_out; - if (globals.ChannelState[channel].func_mode==dc_mode_on && globals.ChannelState[channel].polarity==pol_norm) { + if (globals.ChannelState[channel].func_mode==dc_mode_on && globals.ChannelState[channel].inverted==pol_norm) { mux_out=4; - } else if (globals.ChannelState[channel].func_mode==dc_mode_on && globals.ChannelState[channel].polarity!=pol_norm) { + } else if (globals.ChannelState[channel].func_mode==dc_mode_on && globals.ChannelState[channel].inverted!=pol_norm) { mux_out=5; - } else if (globals.ChannelState[channel].pw_ctrl_mode!=pw_in_out && globals.ChannelState[channel].polarity==pol_norm) { + } else if (globals.ChannelState[channel].pw_ctrl_mode!=pw_in_out && globals.ChannelState[channel].inverted==pol_norm) { mux_out=2; - } else if (globals.ChannelState[channel].pw_ctrl_mode!=pw_in_out && globals.ChannelState[channel].polarity!=pol_norm) { + } else if (globals.ChannelState[channel].pw_ctrl_mode!=pw_in_out && globals.ChannelState[channel].inverted!=pol_norm) { mux_out=3; - } else if (globals.ChannelState[channel].polarity==pol_norm) { + } else if (globals.ChannelState[channel].inverted==pol_norm) { mux_out=0; - } else if (globals.ChannelState[channel].polarity!=pol_norm) { + } else if (globals.ChannelState[channel].inverted!=pol_norm) { mux_out=1; } @@ -1086,12 +1086,12 @@ int Set_Func(int channel,int mode) } -int Set_Pol(int channel,int mode) +int Set_Inverted(int channel,int mode) { int error_num, i; /* abandon if high channel selected by user but not enabled by firmware */ - if (channel && !globals.Flash.ChanKey_polarity) { + if (channel && !globals.Flash.ChanKey_inverted) { return InvalidChannel; } @@ -1099,12 +1099,12 @@ int Set_Pol(int channel,int mode) for (i=0; i> 1) & 1; globals.ChannelState[i].double_pulse = (temp >> 2) & 1; globals.ChannelState[i].pw_ctrl_mode = (temp >> 3) & 3; - globals.ChannelState[i].polarity = (temp >> 5) & 1; + globals.ChannelState[i].inverted = (temp >> 5) & 1; globals.ChannelState[i].output_state = (temp >> 6) & 1; globals.ChannelState[i].gate_type = (temp >> 7) & 1; globals.ChannelState[i].trigger_source = (temp >> 8) & 7; @@ -4335,7 +4335,7 @@ void Set_Rcl(int setting_num) 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_Inverted(i,globals.ChannelState[i].inverted); Set_Gate_Sync(i,globals.ChannelState[i].gate_type); Set_Gate_Level(i,globals.ChannelState[i].gate_level); Set_EA(i,globals.ChannelState[i].amp_mode); @@ -4406,7 +4406,7 @@ void Set_Sav(int setting_num) globals.ChannelState[i].double_pulse double_on 1, double_off 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].inverted pol_norm 0, pol_complement 1 globals.ChannelState[i].output_state output_off 0,output_on 1 globals.ChannelState[i].gate_type gate_sync 0, gate_async 1 globals.ChannelState[i].trigger_source source_internal 0, source_external 1, source_manual 2, source_hold 3, source_immediate 4 @@ -4423,7 +4423,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].pw_ctrl_mode << 3; - temp |= globals.ChannelState[i].polarity << 5; + temp |= globals.ChannelState[i].inverted << 5; temp |= globals.ChannelState[i].output_state << 6; temp |= globals.ChannelState[i].gate_type << 7; temp |= globals.ChannelState[i].trigger_source << 8; -- cgit