Redesign UI, part I

This commit is contained in:
2025-12-24 15:43:50 +01:00
parent 19aa6518c2
commit 029e9d2909
7 changed files with 134 additions and 358 deletions

View File

@@ -282,6 +282,9 @@ std::optional<BCDataValue> BCDataManager::makeDataValue( BCDevice::ID deviceID,
static BCValueTypeMap s_bcDataTypes
{
{ "Byte", new BCValueTypeWord( "", 1.5625F) },
{ "Word", new BCValueTypeWord( "", 1.5625F) },
{ "Float", new BCValueTypeWord( "", 1.5625F) },
{ "Percent",new BCValueTypeWord( "%", 1.5625 ) },
{ "KWh", new BCValueTypeWord( "kwh", 1.5625 ) },
@@ -323,8 +326,10 @@ std::optional<BCDataValue> BCDataManager::makeDataValue( BCDevice::ID deviceID,
std::optional<BCDataValue> newValue;
std::optional<quint64> IDVal = s_bcValueEnum.keyToValue64( params.ID.toLatin1().constData() );
qDebug() << " --- should create: " << params.Label << ": " << params.UnitType;
if( IDVal.has_value() )
{
if( s_bcDataTypes.contains( params.UnitType ) )
{
@@ -338,10 +343,9 @@ std::optional<BCDataValue> BCDataManager::makeDataValue( BCDevice::ID deviceID,
*/
newValue->label = params.Label;
newValue->defaultValue = params.Default;
/*
//qDebug() << " --- created: " << params.Label;
*/
qDebug() << " --- created: " << params.Label;
}
}