Further renamings.
This commit is contained in:
@@ -49,8 +49,8 @@ BCDataManager::BCDataManager(QObject *parent)
|
||||
{
|
||||
createValueTypes();
|
||||
|
||||
//qRegisterMetaType<BCData*>("BCData*");
|
||||
qRegisterMetaType<BCData*>();
|
||||
//qRegisterMetaType<BCDataItem*>("BCDataItem*");
|
||||
qRegisterMetaType<BCDataItem*>();
|
||||
|
||||
_transmitter.moveToThread(&_worker);
|
||||
|
||||
@@ -144,9 +144,9 @@ void BCDataManager::onSyncFromDevice()
|
||||
BCDataModel* model = _valueModels[_currentDeviceID];
|
||||
BCDataList& currentList = model->getValueList();
|
||||
|
||||
//BCData& value = currentList[4];
|
||||
//BCDataItem& value = currentList[4];
|
||||
|
||||
for( const BCData& value : currentList )
|
||||
for( const BCDataItem& value : currentList )
|
||||
{
|
||||
qDebug() << " --- value: " << value.label;
|
||||
|
||||
@@ -294,10 +294,10 @@ void BCDataManager::loadDeviceData( BCDataList& parsedValues )
|
||||
};
|
||||
|
||||
// __fix! können ungültige werte erzeugt werden ?
|
||||
//BCData newValue = BCData::makeValue( _currentDeviceID, params );
|
||||
//BCDataItem newValue = BCData::makeDataItem( _currentDeviceID, params );
|
||||
//if(newValue)
|
||||
// parsedValues.push_back( newValue );
|
||||
std::optional<BCData> newValue = makeValue( _currentDeviceID, params );
|
||||
std::optional<BCDataItem> newValue = makeDataItem( _currentDeviceID, params );
|
||||
if(newValue)
|
||||
parsedValues.push_back( *newValue );
|
||||
}
|
||||
@@ -307,7 +307,7 @@ void BCDataManager::loadDeviceData( BCDataList& parsedValues )
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<BCData> BCDataManager::makeValue( BCDevice::ID deviceID, const BCDataParams& params )
|
||||
std::optional<BCDataItem> BCDataManager::makeDataItem( BCDevice::ID deviceID, const BCDataParams& params )
|
||||
{
|
||||
|
||||
/*
|
||||
@@ -332,7 +332,7 @@ std::optional<BCData> BCDataManager::makeValue( BCDevice::ID deviceID, const BCD
|
||||
|
||||
*/
|
||||
|
||||
std::optional<BCData> newValue;
|
||||
std::optional<BCDataItem> newValue;
|
||||
|
||||
std::optional<quint64> IDVal = s_bcValueEnum.keyToValue64( params.ID.toLatin1().constData() );
|
||||
if( IDVal.has_value() )
|
||||
@@ -341,7 +341,7 @@ std::optional<BCData> BCDataManager::makeValue( BCDevice::ID deviceID, const BCD
|
||||
{
|
||||
|
||||
const BCDataType& valueType = _valueTypes[params.UnitType];
|
||||
newValue = BCData( valueType, deviceID, static_cast<BC::ID>(IDVal.value()) );
|
||||
newValue = BCDataItem( valueType, deviceID, static_cast<BC::ID>(IDVal.value()) );
|
||||
|
||||
/*
|
||||
setIfExists( params.Factor, newValue.factor );
|
||||
|
||||
Reference in New Issue
Block a user