{ 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 },
sr_err("Serial buffer malloc failed.");
return NULL;
}
- serial_readline(serial, &buf, &len, 150);
+ serial_readline(serial, &buf, &len, 250);
if (!len)
return NULL;
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 {
{ "^\"(\\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 }
};
{ "^\"(\\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 }
};