summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/parser.c b/parser.c
index 0147e69..2f6f46c 100644
--- a/parser.c
+++ b/parser.c
@@ -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: