agilent-dmm: U124x/U125x fixes.
This commit is contained in:
parent
95bc772594
commit
ee2bcdfc44
|
@ -55,6 +55,8 @@ static const struct agdmm_profile supported_agdmm[] = {
|
|||
|
||||
{ AGILENT_U1241, "U1241A", agdmm_jobs_u12xx, agdmm_recvs_u124x },
|
||||
{ AGILENT_U1242, "U1242A", agdmm_jobs_u12xx, agdmm_recvs_u124x },
|
||||
{ AGILENT_U1241, "U1241B", agdmm_jobs_u12xx, agdmm_recvs_u124x },
|
||||
{ AGILENT_U1242, "U1242B", agdmm_jobs_u12xx, agdmm_recvs_u124x },
|
||||
|
||||
{ AGILENT_U1251, "U1251A", agdmm_jobs_u12xx, agdmm_recvs_u125x },
|
||||
{ AGILENT_U1252, "U1252A", agdmm_jobs_u12xx, agdmm_recvs_u125x },
|
||||
|
@ -125,7 +127,7 @@ static GSList *scan(GSList *options)
|
|||
sr_err("Serial buffer malloc failed.");
|
||||
return NULL;
|
||||
}
|
||||
serial_readline(serial, &buf, &len, 150);
|
||||
serial_readline(serial, &buf, &len, 250);
|
||||
if (!len)
|
||||
return NULL;
|
||||
|
||||
|
|
|
@ -411,11 +411,11 @@ static int recv_conf_u124x_5x(const struct sr_dev_inst *sdi, GMatchInfo *match)
|
|||
devc->cur_mqflags = 0;
|
||||
devc->cur_divider = 0;
|
||||
if (mstr[4] == ':') {
|
||||
if (!strcmp(mstr + 4, "AC")) {
|
||||
if (!strncmp(mstr + 5, "AC", 2)) {
|
||||
devc->cur_mqflags |= SR_MQFLAG_AC | SR_MQFLAG_RMS;
|
||||
} else if (!strcmp(mstr + 4, "DC")) {
|
||||
} else if (!strncmp(mstr + 5, "DC", 2)) {
|
||||
devc->cur_mqflags |= SR_MQFLAG_DC;
|
||||
} else if (!strcmp(mstr + 4, "ACDC")) {
|
||||
} else if (!strncmp(mstr + 5, "ACDC", 4)) {
|
||||
/* AC + DC offset */
|
||||
devc->cur_mqflags |= SR_MQFLAG_AC | SR_MQFLAG_DC | SR_MQFLAG_RMS;
|
||||
} else {
|
||||
|
@ -502,8 +502,8 @@ SR_PRIV const struct agdmm_recv agdmm_recvs_u124x[] = {
|
|||
{ "^\"(\\d\\d.{18}\\d)\"$", recv_stat_u124x },
|
||||
{ "^\\*([0-9])$", recv_switch },
|
||||
{ "^([-+][0-9]\\.[0-9]{8}E[-+][0-9]{2})$", recv_fetc },
|
||||
{ "^(VOLT|CURR|RES|CAP) ([-+][0-9\\.E\\-+]+),([-+][0-9\\.E\\-+]+)$", recv_conf_u124x_5x },
|
||||
{ "^(VOLT:[ACD]+) ([-+][0-9\\.E\\-+]+),([-+][0-9\\.E\\-+]+)$", recv_conf_u124x_5x },
|
||||
{ "^\"(VOLT|CURR|RES|CAP) ([-+][0-9\\.E\\-+]+),([-+][0-9\\.E\\-+]+)\"$", recv_conf_u124x_5x },
|
||||
{ "^\"(VOLT:[ACD]+) ([-+][0-9\\.E\\-+]+),([-+][0-9\\.E\\-+]+)\"$", recv_conf_u124x_5x },
|
||||
{ "^\"(DIOD)\"$", recv_conf },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
@ -512,8 +512,8 @@ SR_PRIV const struct agdmm_recv agdmm_recvs_u125x[] = {
|
|||
{ "^\"(\\d\\d.{18}\\d)\"$", recv_stat_u125x },
|
||||
{ "^\\*([0-9])$", recv_switch },
|
||||
{ "^([-+][0-9]\\.[0-9]{8}E[-+][0-9]{2})$", recv_fetc },
|
||||
{ "^(VOLT|CURR|RES|CAP) ([-+][0-9\\.E\\-+]+),([-+][0-9\\.E\\-+]+)$", recv_conf_u124x_5x },
|
||||
{ "^(VOLT:[ACD]+) ([-+][0-9\\.E\\-+]+),([-+][0-9\\.E\\-+]+)$", recv_conf_u124x_5x },
|
||||
{ "^\"(VOLT|CURR|RES|CAP) ([-+][0-9\\.E\\-+]+),([-+][0-9\\.E\\-+]+)\"$", recv_conf_u124x_5x },
|
||||
{ "^\"(VOLT:[ACD]+) ([-+][0-9\\.E\\-+]+),([-+][0-9\\.E\\-+]+)\"$", recv_conf_u124x_5x },
|
||||
{ "^\"(DIOD)\"$", recv_conf },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue