Extract debug tool firmware version at startup

This commit is contained in:
Nav
2023-11-18 23:15:11 +00:00
parent 221d931add
commit 1600888624
6 changed files with 21 additions and 0 deletions

View File

@@ -59,6 +59,10 @@ namespace DebugToolDrivers::Wch
return UsbDevice::getSerialNumber();
}
std::string WchLinkBase::getFirmwareVersionString() {
return "v" + this->getDeviceInfo().firmwareVersion.toString();
}
const DeviceInfo& WchLinkBase::getDeviceInfo() const {
if (!this->cachedDeviceInfo.has_value()) {
this->cachedDeviceInfo = this->wchLinkInterface->getDeviceInfo();