On 04/17/2015 08:38 PM, Alexandru Gagniuc wrote: > From: Alexandru Gagniuc <mrn...@google.com> > > On the Chroma 61604, for example, the SCPI_CMD_BEEPER query returns a > bitmask of what events triggered the beeper. Without this change, the > response was considered to be invalid and the beeper was not disabled. > --- > src/hardware/scpi-pps/protocol.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/hardware/scpi-pps/protocol.c > b/src/hardware/scpi-pps/protocol.c > index be47886..233e420 100644 > --- a/src/hardware/scpi-pps/protocol.c > +++ b/src/hardware/scpi-pps/protocol.c > @@ -65,7 +65,7 @@ SR_PRIV int scpi_cmd_resp(const struct sr_dev_inst *sdi, > GVariant **gvar, > struct sr_scpi_dev_inst *scpi; > va_list args; > double d; > - int ret; > + int ret, resp; > char *s; > const char *cmd; > > @@ -110,6 +110,8 @@ SR_PRIV int scpi_cmd_resp(const struct sr_dev_inst *sdi, > GVariant **gvar, > *gvar = g_variant_new_boolean(TRUE); > else if (!strcasecmp(s, "OFF") || !strcasecmp(s, "0") > || !strcasecmp(s, "NO")) > *gvar = g_variant_new_boolean(FALSE); > + else if (sr_atoi(s, &resp) == SR_OK) > + *gvar = g_variant_new_boolean(!!resp);
This seems overly broad. Note that the beeper commands are optional; they're only there because some hardware likes to beep on every received command, which gets old fast. Can you skip this? -- Bert Vermeulen b...@biot.com email/xmpp ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel