Skip to content

Commit

Permalink
Added target code to firmware select dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Nov 21, 2024
1 parent 7a523ed commit f05ccea
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/bootloaderwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -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("<span style=\"color:green;\">Device name</span>: " + field("boot.firmware.devicename").toString());
QLabel* labelGUID = new QLabel("<span style=\"color:green;\">Current firmware GUID</span>: " + field("boot.firmware.guid").toString());
QLabel* labelVer = new QLabel("<span style=\"color:green;\">Current firmware version</span>: " +
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("<span style=\"color:green;\">Current firmware bootload algorithm</span>: " +
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("<span style=\"color:green;\">Current firmware device code</span>: " +
field("boot.firmware.device.code").toString());
m_chkLocalFile = new QCheckBox("Use local firmware file");
m_chkLocalFile->setStyleSheet("color: rgb(129, 61, 156);");
Expand Down
2 changes: 1 addition & 1 deletion src/bootloaderwizard.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
2 changes: 2 additions & 0 deletions src/cdlgbootfirmware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions src/cfrmnodescan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

}

0 comments on commit f05ccea

Please sign in to comment.