Skip to content

Commit

Permalink
Firmware device code saved
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Nov 22, 2024
1 parent add3abb commit 877deb0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vscp/common/vscp-bootdevice-pic1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
6 changes: 6 additions & 0 deletions src/vscp/common/vscp-bootdevice-vscp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 877deb0

Please sign in to comment.