diff options
author | Mike <mjc@avtechpulse.com> | 2000-01-01 00:22:42 +0900 |
---|---|---|
committer | Mike <mjc@avtechpulse.com> | 2000-01-01 00:22:42 +0900 |
commit | 3bc15db1b4614a3b6992f759fd7b844844fc091a (patch) | |
tree | c0bda5cb6a362cded3be6516448aee0a8c947ed8 /device-functions.c | |
parent | f96c0cbe62a8eb5bb544a40a6ef4231652829812 (diff) |
simplify checks for enabled switchable_zout
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 14 |
1 files 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); |