From 168a8b92e966ac2e42d455fb28faae10ccd392d2 Mon Sep 17 00:00:00 2001
From: Stefan Rueger <stefan.rueger@urclocks.com>
Date: Sun, 11 Sep 2022 15:33:23 +0100
Subject: [PATCH] Default mcuid without warning for parts known at compile time

---
 src/config.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/config.c b/src/config.c
index a0351833..0d5242b3 100644
--- a/src/config.c
+++ b/src/config.c
@@ -850,12 +850,13 @@ void cfg_update_mcuid(AVRPART *part) {
   if(part->prog_modes & PM_aWire)
     return;
 
-  // Find an entry that shares the same name
+  // Find an entry that shares the same name, overwrite mcuid with known, existing mcuid
   for(int i=0; i < sizeof uP_table/sizeof *uP_table; i++) {
     if(strcasecmp(part->desc, uP_table[i].name) == 0) {
       if(part->mcuid != (int) uP_table[i].mcuid) {
+        if(part->mcuid >= 0)
+          yywarning("overwriting mcuid of part %s to be %d", part->desc, uP_table[i].mcuid);
         part->mcuid = uP_table[i].mcuid;
-        yywarning("assigned mcuid = %d to part %s", part->mcuid, part->desc);
       }
       return;
     }