From f05ccea29b4a11c12c9c73ac3cb3d8592d6b62e2 Mon Sep 17 00:00:00 2001 From: Ake Hedman Date: Thu, 21 Nov 2024 20:14:48 +0100 Subject: [PATCH] Added target code to firmware select dialog --- src/bootloaderwizard.cpp | 12 ++++++------ src/bootloaderwizard.h | 2 +- src/cdlgbootfirmware.cpp | 2 ++ src/cfrmnodescan.cpp | 4 ---- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/bootloaderwizard.cpp b/src/bootloaderwizard.cpp index 8f64d594..5ff5329e 100644 --- a/src/bootloaderwizard.cpp +++ b/src/bootloaderwizard.cpp @@ -83,7 +83,7 @@ CWizardPageNickname::CWizardPageNickname(QWidget* parent, CVscpClient* vscpClien vscpworks* pworks = (vscpworks*)QCoreApplication::instance(); m_vscpClient = vscpClient; - m_nickname = 1; + m_nickname = 1; // Initialize default nickname id } /////////////////////////////////////////////////////////////////////////////// @@ -739,16 +739,16 @@ CWizardPageFirmware::initializePage(void) "the firmware you intend to upload.\n"); label->setWordWrap(true); - QLabel* labelDeviceName = new QLabel("Device name: " + field("boot.firmware.devicename").toString()); - QLabel* labelGUID = new QLabel("Current firmware GUID: " + field("boot.firmware.guid").toString()); - QLabel* labelVer = new QLabel("Current firmware version: " + + QLabel* labelDeviceName = new QLabel("Device name: " + field("boot.firmware.devicename").toString()); + QLabel* labelGUID = new QLabel("Current firmware GUID: " + field("boot.firmware.guid").toString()); + QLabel* labelVer = new QLabel("Current firmware version: " + field("boot.firmware.version.major").toString() + "." + field("boot.firmware.version.minor").toString() + "." + field("boot.firmware.version.sub").toString()); - QLabel* labelBootloadAlgorithm = new QLabel("Current firmware bootload algorithm: " + + QLabel* labelBootloadAlgorithm = new QLabel("Current firmware bootload algorithm: " + field("boot.firmware.bootloader.algorithm").toString() + " - " + vscp_getBootLoaderDescription(field("boot.firmware.bootloader.algorithm").toInt())); - QLabel* labelBootloadDeviceCode = new QLabel("Current firmware device code: " + + QLabel* labelBootloadDeviceCode = new QLabel("Current firmware device code: " + field("boot.firmware.device.code").toString()); m_chkLocalFile = new QCheckBox("Use local firmware file"); m_chkLocalFile->setStyleSheet("color: rgb(129, 61, 156);"); diff --git a/src/bootloaderwizard.h b/src/bootloaderwizard.h index 652d8b4a..ebf39992 100644 --- a/src/bootloaderwizard.h +++ b/src/bootloaderwizard.h @@ -93,7 +93,7 @@ class CWizardPageNickname : public QWizardPage { /// A pointer to a VSCP Client CVscpClient* m_vscpClient; - // Default + // Default nickname id uint16_t m_nickname; }; diff --git a/src/cdlgbootfirmware.cpp b/src/cdlgbootfirmware.cpp index 907f4a65..f6fbb672 100644 --- a/src/cdlgbootfirmware.cpp +++ b/src/cdlgbootfirmware.cpp @@ -108,6 +108,8 @@ CDlgBootFirmware::initDialogData(CMDF* pmdf) std::cout << itemstr.toStdString() << "\n"; itemstr += " - Target: "; itemstr += pFirmware->getTarget().c_str(); + itemstr += " - Target Code: "; + itemstr += QString::number(pFirmware->getTargetCode()).toStdString().c_str(); itemstr += " - Version: "; itemstr += pFirmware->getVersion().c_str(); ui->listFirmware->addItem(itemstr); diff --git a/src/cfrmnodescan.cpp b/src/cfrmnodescan.cpp index c1540fb4..289a9479 100644 --- a/src/cfrmnodescan.cpp +++ b/src/cfrmnodescan.cpp @@ -1155,14 +1155,10 @@ CFrmNodeScan::goFirmwareUpdate(void) spdlog::error("Aborting bootloader wizard (initBootLoaderWizard) rv={}", rv); return; } - CWizardPageNickname *pageNickname = (CWizardPageNickname *)wiz.page(CBootLoadWizard::Page_Nickname); pageNickname->setNickname(pitem->m_nodeid); - // Select 'set nickname' page - //wiz.setCurrentId(CBootLoadWizard::Page_Nickname); - wiz.exec(); } \ No newline at end of file