diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2013-08-08 15:42:47 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2013-08-08 15:42:47 -0400 |
commit | 9b3247cc4ac1d731d6221bef448064d14bfddc74 (patch) | |
tree | ddd370037f8fabd9ccb83b1c19329130fbcf5c1d /parser.c | |
parent | 73d7c34660a5fbee66dfe95979778e0f9a86dee6 (diff) |
added basic parser support for EW mode, and added ew_enabled to flash
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -1763,6 +1763,8 @@ static int Go_pw_36(gchar** response, int channel, char *parameter,char *units,i case command_withparam: if (!strcmp(parameter,"in")) { return Set_Pwmode(channel,pw_in_out); + } else if (!strcmp(parameter,"ext")) { + return Set_Pwmode(channel,pw_ew_ext); } else if (status = process_float_param (parameter, &new_pw, globals.Constraints.err_min_pw[channel], globals.Constraints.err_max_pw[channel], NORMAL_ZERO)) { return status; } @@ -1774,11 +1776,19 @@ static int Go_pw_36(gchar** response, int channel, char *parameter,char *units,i break; case query_simple: - if (globals.ChannelState[channel].pw_ctrl_mode==pw_normal) { + switch (globals.ChannelState[channel].pw_ctrl_mode) { + case pw_in_out: + return query_string(response, "IN"); + break; + case pw_ew_ext: + return query_string(response, "EXT"); + break; + default: + case pw_normal: return query_float(response, globals.ChannelState[channel].pw); - } else { - return query_string(response, "The output pulse width is equal to the input pulse width."); + break; } + break; case query_param: |