Merge pull request #817 from mariusgreuel/pr-print-expected-part
Print expected part
This commit is contained in:
commit
0a4193f742
|
@ -294,7 +294,7 @@ prog_def :
|
||||||
lrmv_d(programmers, existing_prog);
|
lrmv_d(programmers, existing_prog);
|
||||||
pgm_free(existing_prog);
|
pgm_free(existing_prog);
|
||||||
}
|
}
|
||||||
PUSH(programmers, current_prog);
|
LISTADD(programmers, current_prog);
|
||||||
// pgm_fill_old_pins(current_prog); // TODO to be removed if old pin data no longer needed
|
// pgm_fill_old_pins(current_prog); // TODO to be removed if old pin data no longer needed
|
||||||
// pgm_display_generic(current_prog, id);
|
// pgm_display_generic(current_prog, id);
|
||||||
current_prog = NULL;
|
current_prog = NULL;
|
||||||
|
@ -387,7 +387,7 @@ part_def :
|
||||||
lrmv_d(part_list, existing_part);
|
lrmv_d(part_list, existing_part);
|
||||||
avr_free_part(existing_part);
|
avr_free_part(existing_part);
|
||||||
}
|
}
|
||||||
PUSH(part_list, current_part);
|
LISTADD(part_list, current_part);
|
||||||
current_part = NULL;
|
current_part = NULL;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
14
src/main.c
14
src/main.c
|
@ -1221,12 +1221,19 @@ int main(int argc, char * argv [])
|
||||||
if (sig->buf[i] != 0x00)
|
if (sig->buf[i] != 0x00)
|
||||||
zz = 0;
|
zz = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool signature_matches =
|
||||||
|
sig->size == 3 &&
|
||||||
|
sig->buf[0] == p->signature[0] &&
|
||||||
|
sig->buf[1] == p->signature[1] &&
|
||||||
|
sig->buf[2] == p->signature[2];
|
||||||
|
|
||||||
if (quell_progress < 2) {
|
if (quell_progress < 2) {
|
||||||
AVRPART * part;
|
AVRPART * part;
|
||||||
|
|
||||||
part = locate_part_by_signature(part_list, sig->buf, sig->size);
|
part = locate_part_by_signature(part_list, sig->buf, sig->size);
|
||||||
if (part) {
|
if (part) {
|
||||||
avrdude_message(MSG_INFO, " (probably %s)", part->id);
|
avrdude_message(MSG_INFO, " (probably %s)", signature_matches ? p->id : part->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ff || zz) {
|
if (ff || zz) {
|
||||||
|
@ -1255,10 +1262,7 @@ int main(int argc, char * argv [])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sig->size != 3 ||
|
if (!signature_matches) {
|
||||||
sig->buf[0] != p->signature[0] ||
|
|
||||||
sig->buf[1] != p->signature[1] ||
|
|
||||||
sig->buf[2] != p->signature[2]) {
|
|
||||||
avrdude_message(MSG_INFO, "%s: Expected signature for %s is %02X %02X %02X\n",
|
avrdude_message(MSG_INFO, "%s: Expected signature for %s is %02X %02X %02X\n",
|
||||||
progname, p->desc,
|
progname, p->desc,
|
||||||
p->signature[0], p->signature[1], p->signature[2]);
|
p->signature[0], p->signature[1], p->signature[2]);
|
||||||
|
|
Loading…
Reference in New Issue