From 284b447e31ced8cec17837b9746e2e9dad6bcf96 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Mon, 27 Jun 2022 12:43:05 +0200 Subject: [PATCH] Add phaseCount state and setting --- genericcar/integrationplugingenericcar.cpp | 2 ++ genericcar/integrationplugingenericcar.json | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/genericcar/integrationplugingenericcar.cpp b/genericcar/integrationplugingenericcar.cpp index 93d919b..e6f5a8f 100644 --- a/genericcar/integrationplugingenericcar.cpp +++ b/genericcar/integrationplugingenericcar.cpp @@ -51,6 +51,8 @@ void IntegrationPluginGenericCar::setupThing(ThingSetupInfo *info) } else if (paramTypeId == carSettingsMinChargingCurrentParamTypeId) { qCDebug(dcGenericCar()) << "Car minimum charging current settings changed" << value.toUInt() << "A"; thing->setStateValue(carMinChargingCurrentStateTypeId, value); + } else if (paramTypeId == carSettingsPhaseCountParamTypeId) { + thing->setStateValue(carPhaseCountStateTypeId, value); } }); diff --git a/genericcar/integrationplugingenericcar.json b/genericcar/integrationplugingenericcar.json index d34662f..9dd1bbd 100644 --- a/genericcar/integrationplugingenericcar.json +++ b/genericcar/integrationplugingenericcar.json @@ -34,6 +34,15 @@ "minValue": 5, "maxValue": 200, "defaultValue": 50 + }, + { + "id": "6ee1534a-f2c7-4819-8cd5-728dc63a31ba", + "name": "phaseCount", + "displayName": "Phase count", + "type": "uint", + "minValue": 1, + "maxValue": 3, + "defaultValue": 1 } ], "stateTypes": [ @@ -77,6 +86,16 @@ "minValue": 6, "maxValue": 16, "defaultValue": 6 + }, + { + "id": "c886c062-bf1a-46c5-8e54-aed804a22d57", + "name": "phaseCount", + "displayName": "Phase count", + "displayNameEvent": "Phase count changed", + "type": "uint", + "minValue": 1, + "maxValue": 3, + "defaultValue": 1 } ] }