Minor whitespace and cosmetic fixes.
This commit is contained in:
parent
3591481e87
commit
0cadb8a350
|
@ -46,10 +46,7 @@ SR_PRIV struct sr_dev_driver siemens_b102x_driver_info;
|
||||||
|
|
||||||
static const char *get_brandstr(struct sr_dev_driver *drv)
|
static const char *get_brandstr(struct sr_dev_driver *drv)
|
||||||
{
|
{
|
||||||
if (drv == &norma_dmm_driver_info)
|
return (drv == &norma_dmm_driver_info) ? "Norma" : "Siemens";
|
||||||
return "Norma";
|
|
||||||
else
|
|
||||||
return "Siemens";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *get_typestr(int type, struct sr_dev_driver *drv)
|
static const char *get_typestr(int type, struct sr_dev_driver *drv)
|
||||||
|
@ -59,7 +56,8 @@ static const char *get_typestr(int type, struct sr_dev_driver *drv)
|
||||||
{"DM920", "B1025"},
|
{"DM920", "B1025"},
|
||||||
{"DM930", "B1026"},
|
{"DM930", "B1026"},
|
||||||
{"DM940", "B1027"},
|
{"DM940", "B1027"},
|
||||||
{"DM950", "B1028"}};
|
{"DM950", "B1028"},
|
||||||
|
};
|
||||||
|
|
||||||
if ((type < 1) || (type > 5))
|
if ((type < 1) || (type > 5))
|
||||||
return "Unknown type!";
|
return "Unknown type!";
|
||||||
|
@ -80,11 +78,10 @@ static GSList *scan(struct sr_dev_driver *drv, GSList *options)
|
||||||
struct sr_config *src;
|
struct sr_config *src;
|
||||||
struct sr_serial_dev_inst *serial;
|
struct sr_serial_dev_inst *serial;
|
||||||
GSList *l, *devices;
|
GSList *l, *devices;
|
||||||
int len, cnt;
|
int len, cnt, auxtype;
|
||||||
const char *conn, *serialcomm;
|
const char *conn, *serialcomm;
|
||||||
char *buf;
|
char *buf;
|
||||||
char req[10];
|
char req[10];
|
||||||
int auxtype;
|
|
||||||
|
|
||||||
devices = NULL;
|
devices = NULL;
|
||||||
drvc = drv->context;
|
drvc = drv->context;
|
||||||
|
@ -131,7 +128,7 @@ static GSList *scan(struct sr_dev_driver *drv, GSList *options)
|
||||||
continue;
|
continue;
|
||||||
buf[BUF_MAX - 1] = '\0';
|
buf[BUF_MAX - 1] = '\0';
|
||||||
|
|
||||||
/* Match ID string, e.g. "1834 065 V1.06,IF V1.02" (DM950) */
|
/* Match ID string, e.g. "1834 065 V1.06,IF V1.02" (DM950). */
|
||||||
if (g_regex_match_simple("^1834 [^,]*,IF V*", (char *)buf, 0, 0)) {
|
if (g_regex_match_simple("^1834 [^,]*,IF V*", (char *)buf, 0, 0)) {
|
||||||
auxtype = xgittoint(buf[7]);
|
auxtype = xgittoint(buf[7]);
|
||||||
sr_spew("%s %s DMM %s detected!", get_brandstr(drv), get_typestr(auxtype, drv), buf + 9);
|
sr_spew("%s %s DMM %s detected!", get_brandstr(drv), get_typestr(auxtype, drv), buf + 9);
|
||||||
|
|
Loading…
Reference in New Issue