From 90945da9dcd51e4868fba94255ff2eae4ae1d44f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Tue, 3 Jan 2023 12:09:52 +0100 Subject: [PATCH] CommonHelpers: Set values to 0xFF to debug that memory was failed to read --- CommonHelpers/Vlv0100.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CommonHelpers/Vlv0100.cs b/CommonHelpers/Vlv0100.cs index d91a700..0c4c230 100644 --- a/CommonHelpers/Vlv0100.cs +++ b/CommonHelpers/Vlv0100.cs @@ -63,14 +63,20 @@ var data = inpOut?.ReadMemory(PDFV, 2); if (data is not null) FirmwareVersion = BitConverter.ToUInt16(data); + else + FirmwareVersion = 0xFFFF; data = inpOut?.ReadMemory(XBID, 1); if (data is not null) BoardID = data[0]; + else + BoardID = 0xFF; data = inpOut?.ReadMemory(PDCT, 1); if (data is not null) PDCS = data[0]; + else + PDCS = 0xFF; return true; }