From 3bc15db1b4614a3b6992f759fd7b844844fc091a Mon Sep 17 00:00:00 2001 From: Mike Date: Sat, 1 Jan 2000 00:22:42 +0900 Subject: simplify checks for enabled switchable_zout --- device-functions.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/device-functions.c b/device-functions.c index 25814c1..87e67e9 100644 --- a/device-functions.c +++ b/device-functions.c @@ -188,9 +188,7 @@ void Main_Rst (void) Set_Gate_Level(i,globals.ChannelState[i].gate_level); Set_EA(i,globals.ChannelState[i].amp_mode); Set_EO(i,globals.ChannelState[i].os_mode); - if (globals.Flash.switchable_zout[i]) { - Set_zout(i,globals.ChannelState[i].zout,1); - } + Set_zout(i,globals.ChannelState[i].zout,1); Set_Load(i,globals.ChannelState[i].load_type); Set_Logic_Level(i,globals.ChannelState[i].logic_level); @@ -1356,6 +1354,10 @@ int Set_zout(int channel,int setting,int really_for_zout) int update_zout_slowly; update_zout_slowly=NO; + if (!globals.Flash.switchable_zout[channel] && really_for_zout) { + return Unrecognized; + } + /* abandon if high channel selected by user but not enabled by firmware */ if (channel && !globals.Flash.ChanKey_zout) { return InvalidChannel; @@ -4539,11 +4541,7 @@ void Set_Rcl(int setting_num) Set_Gate_Level(i,globals.ChannelState[i].gate_level); Set_EA(i,globals.ChannelState[i].amp_mode); Set_EO(i,globals.ChannelState[i].os_mode); - - if (globals.Flash.switchable_zout[i]) { - Set_zout(i,globals.ChannelState[i].zout,1); - } - + Set_zout(i,globals.ChannelState[i].zout,1); Set_Load(i,globals.ChannelState[i].load_type); Set_Logic_Level(i,globals.ChannelState[i].logic_level); Set_rise_time(0,0,0,i,globals.ChannelState[i].rise_time); -- cgit