diff options
-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; } |