* Try to find message consisting of device code and several
* (at least 4) data bytes.
*/
+ serial_flush(serial);
for (bytecnt = 0; bytecnt < 100; bytecnt++) {
byte = read_byte(serial, timeout_us);
if ((byte == -1) || (timeout_us < g_get_monotonic_time()))
return NULL;
}
- serial_flush(serial);
-
model = scan_model_sm(serial);
/*
serialcomm = SERIALCOMM_1X_RS232;
g_free(serial->serialcomm);
serial->serialcomm = g_strdup(serialcomm);
- if (serial_set_paramstr(serial, serialcomm) == SR_OK) {
- serial_flush(serial);
+ if (serial_set_paramstr(serial, serialcomm) == SR_OK)
model = scan_model_sm(serial);
- }
}
if (model != METRAHIT_NONE) {