diff options
author | Mike <mjc@avtechpulse.com> | 2000-01-01 00:26:13 +0900 |
---|---|---|
committer | Mike <mjc@avtechpulse.com> | 2000-01-01 00:26:13 +0900 |
commit | 47965bf605cea2f6ebbcbbdd8ec2563fad09dd1d (patch) | |
tree | f81b5707cb5239cbafe4df47a6adb1d201f73e48 /menus.c | |
parent | 6a0f514e2a26cc698b8afbb156928a2a92b8161b (diff) |
Simplify needlessly complex error handling when adjusting encoder
Diffstat (limited to 'menus.c')
-rw-r--r-- | menus.c | 56 |
1 files changed, 14 insertions, 42 deletions
@@ -2569,9 +2569,7 @@ static void Submenu_Service_Encoder(int encoder_change) if (globals.Flash.min_freq[channel]==globals.Flash.max_freq[channel]) { return; } - if (error_num=Set_frequency(0,0,0,channel,new_value)) { - Submenu_Value=new_value; - } + error_num=Set_frequency(0,0,0,channel,new_value); break; case Show_delay: @@ -2602,9 +2600,7 @@ static void Submenu_Service_Encoder(int encoder_change) } } - if (error_num=Set_Delay(0,0,0,channel,new_value)) { - Submenu_Value=new_value; - } + error_num=Set_Delay(0,0,0,channel,new_value); break; case Show_pw: @@ -2635,39 +2631,27 @@ static void Submenu_Service_Encoder(int encoder_change) } } - if (error_num=Set_Pw(0,0,0,channel,new_value,0)) { - Submenu_Value=new_value; - } + error_num=Set_Pw(0,0,0,channel,new_value,0); break; case Show_Burst_Time: - if (error_num=Set_Burst_Time(0,0,0,channel,new_value)) { - Submenu_Value=new_value; - } + error_num=Set_Burst_Time(0,0,0,channel,new_value); break; case Show_rise_time: - if (error_num=Set_rise_time(0,0,0,channel,new_value)) { - Submenu_Value=new_value; - } + error_num=Set_rise_time(0,0,0,channel,new_value); break; case Show_slew: - if (error_num=Set_slew(0,0,0,channel,new_value)) { - Submenu_Value=new_value; - } + error_num=Set_slew(0,0,0,channel,new_value); break; case Show_load_type: - if (error_num=Set_Load(channel,new_value)) { - Submenu_Value=new_value; - } + error_num=Set_Load(channel,new_value); break; case Show_soft_current_limit: - if (error_num=Set_current_limit(0,channel,new_value)) { - Submenu_Value=new_value; - } + error_num=Set_current_limit(0,channel,new_value); break; case Show_amplitude: @@ -2697,9 +2681,7 @@ static void Submenu_Service_Encoder(int encoder_change) } - if (error_num=Set_Amplitude(0,0,0,0,0,0,0,channel,new_value,0)) { - Submenu_Value=new_value; - } + error_num=Set_Amplitude(0,0,0,0,0,0,0,channel,new_value,0); break; case Show_offset: @@ -2714,15 +2696,11 @@ static void Submenu_Service_Encoder(int encoder_change) } } - if (error_num=Set_Offset(0,0,0,0,channel,new_value)) { - Submenu_Value=new_value; - } + error_num=Set_Offset(0,0,0,0,channel,new_value); break; case Show_duty_cycle: - if (error_num=Set_Pw(0,0,0,channel,new_value/(100*globals.ChannelState[channel].frequency),0)) { - Submenu_Value=new_value; - } + error_num=Set_Pw(0,0,0,channel,new_value/(100*globals.ChannelState[channel].frequency),0); break; case Show_gpib_address: @@ -2731,21 +2709,15 @@ static void Submenu_Service_Encoder(int encoder_change) break; case Show_Burst_Count: - if (error_num=Set_Burst_Count(channel,new_int_value,globals.ChannelState[channel].burst_time)) { - Submenu_Value=new_value; - } + error_num=Set_Burst_Count(channel,new_int_value,globals.ChannelState[channel].burst_time); break; case Show_route_primary: - if (error_num=Set_Route(channel,ROUTE_PRIMARY,new_int_value)) { - Submenu_Value=new_value; - } + error_num=Set_Route(channel,ROUTE_PRIMARY,new_int_value); break; case Show_route_secondary: - if (error_num=Set_Route(channel,ROUTE_SECONDARY,new_int_value)) { - Submenu_Value=new_value; - } + error_num=Set_Route(channel,ROUTE_SECONDARY,new_int_value); break; } |