Sending BCValueList to ViewPanels.

This commit is contained in:
2025-12-27 18:43:15 +01:00
parent a12fde26ef
commit 139397f045
9 changed files with 129 additions and 71 deletions

View File

@@ -83,11 +83,6 @@ BCTransmitter* BCDataManager::getTransmitter()
return &_transmitter;
};
const BCValueList& BCDataManager::getCurrentValueList()
{
return _currentValues;
}
void BCDataManager::onCommandFinished(int id, bool success)
{
@@ -224,8 +219,8 @@ void BCDataManager::loadXmlBikeDeviceData(BCDevice::ID deviceID)
Q_ASSERT(_xml.isStartElement() && _xml.name() == "Device"_L1);
qDebug() << " XXX ---------------";
// Wertliste für neues Device leeren
_currentValues.clear();
// temporäre Wertliste für neues Device
BCValueList currentValues;
while( _xml.readNextStartElement() )
{
@@ -245,15 +240,15 @@ void BCDataManager::loadXmlBikeDeviceData(BCDevice::ID deviceID)
// nur gültige Werte sind vorhanden und können gespeichert werden
std::optional<BCDataValue> newValue = makeDataValue( deviceID, params );
if(newValue)
_currentValues.push_back( *newValue );
currentValues.push_back( *newValue );
}
// weiter zum nächsten Element
_xml.skipCurrentElement();
}
// Wenn dieses Device fertig geladen wurde, soll das MainWindow es abholen
if( !_currentValues.isEmpty() )
emit valueListReady( deviceID );
if( !currentValues.isEmpty() )
emit valueListReady( deviceID, currentValues );
}