From 3e75a53ba6991af1499f8355d97ac4da33e642a0 Mon Sep 17 00:00:00 2001 From: Jenna Fox Date: Tue, 2 Oct 2012 14:51:16 +1000 Subject: Made live progress printouts more human friendly (total progress instead of step progress) --- commandline/library/micronucleus_lib.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'commandline/library/micronucleus_lib.c') diff --git a/commandline/library/micronucleus_lib.c b/commandline/library/micronucleus_lib.c index 2e63425..1c3c179 100644 --- a/commandline/library/micronucleus_lib.c +++ b/commandline/library/micronucleus_lib.c @@ -47,6 +47,14 @@ micronucleus* micronucleus_connect() { nucleus = malloc(sizeof(micronucleus)); nucleus->version.major = (dev->descriptor.bcdUSB >> 8) & 0xFF; nucleus->version.minor = dev->descriptor.bcdUSB & 0xFF; + + if (nucleus->version.major > MICRONUCLEUS_MAX_MAJOR_VERSION) { + fprintf(stderr, "Warning: device with unknown new version of Micronucleus detected.\n"); + fprintf(stderr, "This tool doesn't know how to upload to this new device. Updates may be available.\n"); + fprintf(stderr, "Device reports version as: %d.%d\n", nucleus->version.major, nucleus->version.minor); + return NULL; + } + nucleus->device = usb_open(dev); // get nucleus info -- cgit v1.2.3