Made 'syncFromDevice' work again.
This commit is contained in:
@@ -50,8 +50,8 @@ BCDataManager::BCDataManager(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
|
||||
//qRegisterMetaType<BCDataValue*>("BCDataValue*");
|
||||
//qRegisterMetaType<BCDataValue*>();
|
||||
//qRegisterMetaType<BCValue*>("BCValue*");
|
||||
//qRegisterMetaType<BCValue*>();
|
||||
|
||||
|
||||
}
|
||||
@@ -167,7 +167,7 @@ void BCDataManager::loadXmlBikeDeviceData(BCDevice::ID deviceID)
|
||||
};
|
||||
|
||||
// nur gültige Werte sind vorhanden und können gespeichert werden
|
||||
std::optional<BCDataValue> newValue = makeDataValue( deviceID, params );
|
||||
std::optional<BCValue> newValue = makeDataValue( deviceID, params );
|
||||
if(newValue)
|
||||
currentValues.push_back( *newValue );
|
||||
}
|
||||
@@ -181,7 +181,7 @@ void BCDataManager::loadXmlBikeDeviceData(BCDevice::ID deviceID)
|
||||
|
||||
}
|
||||
|
||||
std::optional<BCDataValue> BCDataManager::makeDataValue( BCDevice::ID deviceID, const BCDataParams& params )
|
||||
std::optional<BCValue> BCDataManager::makeDataValue( BCDevice::ID deviceID, const BCDataParams& params )
|
||||
{
|
||||
|
||||
/*
|
||||
@@ -242,7 +242,7 @@ std::optional<BCDataValue> BCDataManager::makeDataValue( BCDevice::ID deviceID,
|
||||
|
||||
*/
|
||||
|
||||
std::optional<BCDataValue> newValue;
|
||||
std::optional<BCValue> newValue;
|
||||
|
||||
std::optional<quint64> IDVal = s_bcValueEnum.keyToValue64( params.ID.toLatin1().constData() );
|
||||
qDebug() << " --- should create: " << params.Label << ": " << params.UnitType;
|
||||
@@ -253,7 +253,7 @@ std::optional<BCDataValue> BCDataManager::makeDataValue( BCDevice::ID deviceID,
|
||||
{
|
||||
|
||||
const BCValueType* valueType = s_bcDataTypes[params.UnitType];
|
||||
newValue = BCDataValue( valueType, deviceID, static_cast<BC::ID>(IDVal.value()) );
|
||||
newValue = BCValue( valueType, deviceID, static_cast<BC::ID>(IDVal.value()) );
|
||||
|
||||
/*
|
||||
setIfExists( params.Factor, newValue.factor );
|
||||
|
||||
Reference in New Issue
Block a user