diff options
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 97 |
1 files changed, 2 insertions, 95 deletions
@@ -112,7 +112,6 @@ static int Go_rcl_53(gchar** response, int channel, char *parameter,char *units, static int Go_sav_54(gchar** response, int channel, char *parameter,char *units,int command_type); static int Go_soft_current_limit_96(gchar** response, int channel, char *parameter,char *units,int command_type); static int Go_curr_slew_98(gchar** response, int channel, char *parameter,char *units,int command_type); -static int Go_avrq_ampl(gchar** response, int channel, char *parameter,char *units,int command_type); static int Go_cal_100(gchar** response, int channel, char *parameter,char *units,int command_type); static int Go_cal_interval_101(gchar** response, int channel, char *parameter,char *units,int command_type); static int Go_eprom_reset_102(gchar** response, int channel, char *parameter,char *units,int command_type); @@ -1030,9 +1029,6 @@ void Parser_main (char *raw_in, int interactive_terminal, void(*cbfunc)(gpointer case 96: error_num=Go_soft_current_limit_96(&response,channel,parameter,units,command_type); break; - case 97: - error_num=Go_amp_pnt_83(&response,channel,parameter,units,command_type,pwl_load_type_values); - break; case 98: error_num=Go_curr_slew_98(&response,channel,parameter,units,command_type); break; @@ -1113,10 +1109,7 @@ static int Parser_channel (int *channel,int with_id_code,int routine_num) /* compare to maximum number of channels allowed */ - if (*channel>1 && *channel>globals.Flash.channels && !globals.Flash.enable_avrq_extra_ampls) { - return InvalidChannel; - } - if (*channel>5 && globals.Flash.enable_avrq_extra_ampls) { + if (*channel>1 && *channel>globals.Flash.channels) { return InvalidChannel; } @@ -1683,9 +1676,6 @@ static int Go_ampl_26(gchar** response, int channel, char *parameter,char *units return status; } if (!strcmp(mode,"v")) { - if (globals.Flash.enable_avrq_extra_ampls && channel > 1) { - return Go_avrq_ampl (response, channel, parameter, units, command_type); - } if (!globals.Flash.voltage_enabled[channel]) { return Unrecognized; } @@ -3425,22 +3415,9 @@ static int Go_amp_pnt_83(gchar** response, int channel, char *parameter,char *un if (status = check_channel_ok (channel, globals.Flash.channels, globals.Flash.ChanKey_amplitude)) { return status; } - if (!globals.Flash.enable_avrq_extra_ampls && !globals.Flash.voltage_enabled[channel] && !globals.Flash.current_enabled[channel]) { + if (!globals.Flash.voltage_enabled[channel] && !globals.Flash.current_enabled[channel]) { return Unrecognized; } - if ((channel > 1) && globals.Flash.enable_avrq_extra_ampls) { - switch (channel) { - case 2: - cal_type=pwl_vcc1_values; - break; - case 3: - cal_type=pwl_vcc2_values; - break; - default: - return InvalidChannel; - break; - } - } break; case pwl_rise_time_values: if (status = check_channel_ok (channel, globals.Flash.channels, globals.Flash.ChanKey_rise_time)) { @@ -3458,14 +3435,6 @@ static int Go_amp_pnt_83(gchar** response, int channel, char *parameter,char *un return Unrecognized; } break; - case pwl_load_type_values: - if (status = check_channel_ok (channel, globals.Flash.channels, globals.Flash.ChanKey_load_type)) { - return status; - } - if (!globals.Flash.switchable_load[channel]) { - return Unrecognized; - } - break; case pwl_os_values: if (status = check_channel_ok (channel, globals.Flash.channels, globals.Flash.ChanKey_offset)) { return status; @@ -3945,68 +3914,6 @@ static int Go_curr_slew_98(gchar** response, int channel, char *parameter,char * } -static int Go_avrq_ampl(gchar** response, int channel, char *parameter,char *units,int command_type) -{ - float new_ampl; - int status; - float min_val,max_val,cur_val; - - new_ampl=1.0; - - switch (channel) { - case 2: - min_val=globals.Constraints.err_min_vcc1[0]; - max_val=globals.Constraints.err_max_vcc1[0]; - cur_val=globals.ChannelState[0].vcc1; - break; - case 3: - min_val=globals.Constraints.err_min_vcc2[0]; - max_val=globals.Constraints.err_max_vcc2[0]; - cur_val=globals.ChannelState[0].vcc2; - break; - case 4: - min_val=globals.Constraints.err_min_vlogic[0]; - max_val=globals.Constraints.err_max_vlogic[0]; - cur_val=globals.ChannelState[0].vlogic; - break; - default: - return InvalidChannel; - break; - } - - switch (command_type) { - case command_param_units: - if (status=Handle_Units(&new_ampl,units,"v")) { - return status; - } - /* no break */ - - case command_withparam: - if (status = process_float_param (parameter, &new_ampl, min_val, max_val, NORMAL_ZERO)) { - return status; - } - return Set_Amplitude(0,0,0,0,0,0,channel,new_ampl,0); - break; - - case query_simple: - - return query_float(response, cur_val); - break; - - case query_param: - - return query_min_max_float (response, parameter, min_val, max_val); - break; - - default: - return SyntaxError; - break; - } - - return ThisShouldntHappen; -} - - static int Go_cal_100(gchar** response, int channel, char *parameter,char *units,int command_type) { int no_report, status; |