Sending BCValueList to ViewPanels.
This commit is contained in:
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user