From 877deb0cfcd7fb23fceaa31afc8c04b6c7775c52 Mon Sep 17 00:00:00 2001 From: Ake Hedman Date: Fri, 22 Nov 2024 16:56:17 +0100 Subject: [PATCH] Firmware device code saved --- src/vscp/common/vscp-bootdevice-pic1.cpp | 3 +++ src/vscp/common/vscp-bootdevice-vscp.cpp | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/vscp/common/vscp-bootdevice-pic1.cpp b/src/vscp/common/vscp-bootdevice-pic1.cpp index 442d0875c..ca77139f2 100644 --- a/src/vscp/common/vscp-bootdevice-pic1.cpp +++ b/src/vscp/common/vscp-bootdevice-pic1.cpp @@ -235,6 +235,9 @@ CBootDevice_PIC1::deviceInit(cguid& ourguid, uint16_t devicecode, bool bAbortOnF // Save our local GUID m_ourguid = ourguid; + // Save Firmware device code + m_firmwaredeviceCode = devicecode; + /* First do a test to see if the device is already in boot mode if it is 0x14nn/0x15nn should be returned (nn == nodeid). diff --git a/src/vscp/common/vscp-bootdevice-vscp.cpp b/src/vscp/common/vscp-bootdevice-vscp.cpp index bfff78168..f4b7adb88 100644 --- a/src/vscp/common/vscp-bootdevice-vscp.cpp +++ b/src/vscp/common/vscp-bootdevice-vscp.cpp @@ -216,6 +216,12 @@ CBootDevice_VSCP::deviceInit(cguid &ourguid, uint16_t devicecode, bool bAbortOnF int rv; vscpEventEx ex; + // Save our local GUID + m_ourguid = ourguid; + + // Save Firmware device code + m_firmwaredeviceCode = devicecode; + // Read standard registers if (VSCP_ERROR_SUCCESS != m_stdRegs.init(*m_pclient, m_guid, m_guidif, nullptr, REGISTER_DEFAULT_TIMEOUT)) { spdlog::error("VSCP bootloader: Failed to read standard registers");