if (want_product == AltosLib.product_basestation)
return have_product == AltosLib.product_teledongle ||
- have_product == AltosLib.product_teleterra ||
have_product == AltosLib.product_telebt ||
have_product == AltosLib.product_megadongle;
have_product == AltosLib.product_easymega ||
have_product == AltosLib.product_telegps ||
have_product == AltosLib.product_easymini ||
- have_product == AltosLib.product_telemini;
+ have_product == AltosLib.product_telemini ||
+ have_product == AltosLib.product_easytimer;
if (have_product == AltosLib.product_altusmetrum) /* old devices match any request */
return true;
}
int read(byte[] buffer, int len) {
+ if (connection == null)
+ return 0;
int ret = connection.bulkTransfer(in, buffer, len, -1);
AltosDebug.debug("read(%d) = %d\n", len, ret);
return ret;
}
int write(byte[] buffer, int len) {
+ if (connection == null)
+ return 0;
int ret = connection.bulkTransfer(out, buffer, len, -1);
AltosDebug.debug("write(%d) = %d\n", len, ret);
return ret;