summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:17:35 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:17:35 +0900
commitbee40b77fc98991b4b6ef33b1e738915bc989ff0 (patch)
tree7ed45ce42ab76f6600042fe8bb815001f15af699 /device-functions.c
parent8dc1f4f10021a55398d6f47621395ce402cdee06 (diff)
rename "polarity" variables to "inverted" for clarity
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c38
1 files changed, 19 insertions, 19 deletions
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<max_channels; ++i) {
TestState[i]=globals.ChannelState[i];
}
- TestState[channel].polarity=mode;
+ TestState[channel].inverted=mode;
if ((error_num=Error_check(TestState))) {
return error_num;
}
- globals.ChannelState[channel].polarity=mode;
+ globals.ChannelState[channel].inverted=mode;
Set_Mux(channel);
Set_Update_Chans();
@@ -1621,8 +1621,8 @@ int Set_Update_Chans(void)
if (!globals.Flash.ChanKey_func_mode) for (i=1; i<num_of_chan; ++i) {
globals.ChannelState[i].func_mode=globals.ChannelState[0].func_mode;
}
- if (!globals.Flash.ChanKey_polarity) for (i=1; i<num_of_chan; ++i) {
- globals.ChannelState[i].polarity=globals.ChannelState[0].polarity;
+ if (!globals.Flash.ChanKey_inverted) for (i=1; i<num_of_chan; ++i) {
+ globals.ChannelState[i].inverted=globals.ChannelState[0].inverted;
}
if (!globals.Flash.ChanKey_output_state) for (i=1; i<num_of_chan; ++i) {
globals.ChannelState[i].output_state=globals.ChannelState[0].output_state;
@@ -2148,7 +2148,7 @@ int Set_Cal_Nom(int channel,int calibration_point_number,int parameter, float *n
other_setting=0.4;
}
- Set_Pol(channel,pol_norm);
+ Set_Inverted(channel,pol_norm);
Set_Delay(0,0,0,channel,0.0);
status=Set_frequency(0,0,0,globals.Flash.ChanKey_frequency?channel:0,other_setting);
@@ -4309,7 +4309,7 @@ void Set_Rcl(int setting_num)
globals.ChannelState[i].hold_setting = (temp >> 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;