From 5f686d5179d6a23a37378550b8c1122453d240c1 Mon Sep 17 00:00:00 2001 From: Attila Veghelyi Date: Tue, 25 Jun 2024 20:25:31 +0200 Subject: Stop the process when device ID is unknown --- progEEPROM.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'progEEPROM.c') diff --git a/progEEPROM.c b/progEEPROM.c index f0e8259..fa6d138 100644 --- a/progEEPROM.c +++ b/progEEPROM.c @@ -1555,7 +1555,7 @@ struct ID_OW{ {0x43,"DS28EC20\r\n"}, }; -void OW_ID(int id) +static bool OW_ID(int id) { char s[64]; int i; @@ -1563,11 +1563,11 @@ void OW_ID(int id) if(id==OW_LIST[i].id){ sprintf(s,OW_LIST[i].device,id); PrintMessage(s); - return; + return true; } } - sprintf(s,"%s",strings[S_nodev]); //"Unknown device\r\n"); - PrintMessage(s); + PrintMessage(strings[S_nodev]); //"Unknown device\r\n"); + return false; } #define READ_ROM 0x33 -- cgit v1.2.3-54-g00ecf