summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:19:25 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:19:25 +0900
commit6a0f514e2a26cc698b8afbb156928a2a92b8161b (patch)
tree7b3f9670726b5fa111ddded3d6ef5369e4bcc937
parent43b5f24651fe081a85f2def30f6f8023ae60ac1b (diff)
Simplify needlessly complex error handling when mult/div menu values
-rw-r--r--menus.c44
1 files changed, 11 insertions, 33 deletions
diff --git a/menus.c b/menus.c
index aa47c32..7c3bcb5 100644
--- a/menus.c
+++ b/menus.c
@@ -2172,9 +2172,7 @@ static int Submenu_Mult_Value(float mult_by)
switch (Submenu_Numeric_Parameter-channel) {
case Show_frequency:
- 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:
@@ -2195,9 +2193,7 @@ static int Submenu_Mult_Value(float mult_by)
}
}
- 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:
@@ -2218,9 +2214,7 @@ static int Submenu_Mult_Value(float mult_by)
}
}
- 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_amplitude:
@@ -2240,39 +2234,27 @@ static int Submenu_Mult_Value(float mult_by)
}
}
- 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_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_offset:
@@ -2292,15 +2274,11 @@ static int Submenu_Mult_Value(float mult_by)
}
}
- 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;
}