diff options
| author | Jenna Fox <a@creativepony.com> | 2012-10-02 14:51:16 +1000 | 
|---|---|---|
| committer | Jenna Fox <a@creativepony.com> | 2012-10-02 14:51:16 +1000 | 
| commit | 3e75a53ba6991af1499f8355d97ac4da33e642a0 (patch) | |
| tree | 71b375d8465e2731d4c38ca173100273ab13a7ce /commandline/library/micronucleus_lib.c | |
| parent | 85669da5c3101b2e8c815e257a5e17615ada26f5 (diff) | |
| download | micronucleus-3e75a53ba6991af1499f8355d97ac4da33e642a0.tar.gz micronucleus-3e75a53ba6991af1499f8355d97ac4da33e642a0.tar.bz2 micronucleus-3e75a53ba6991af1499f8355d97ac4da33e642a0.zip | |
Made live progress printouts more human friendly (total progress instead of step progress)
Diffstat (limited to 'commandline/library/micronucleus_lib.c')
| -rw-r--r-- | commandline/library/micronucleus_lib.c | 8 | 
1 files changed, 8 insertions, 0 deletions
| 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 | 
