Skip to content

Commit 14cd5b7

Browse files
committed
Change Actuator's changeMode to ON_CHANGE or CONTINUOUS.
Signed-off-by: Jan Kubovy <jan.kubovy@bmw.de>
1 parent ae9a510 commit 14cd5b7

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docs/vhal.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ and one additional we call VSS to demonstrate the possibility of a VSS specific
1919
Each VHAL property has one of the following change modes:
2020

2121
STATIC
22-
: used to VSS node types ATTRIBUTE and ACTUATOR.
22+
: used to VSS node types ATTRIBUTE.
2323

2424
ON_CHANGE
25-
: used for VSS node type SENSOR.
25+
: used for VSS node types ACTUATOR and SENSOR.
2626

2727
CONTINUOUS
28-
: used for VSS node type SENSOR if the path of that VSS node is present in JSON file provided by `--continuous-change-mode`.
28+
: used for VSS node types ACTUATOR and SENSOR if the path of that VSS node is present in JSON file provided by `--continuous-change-mode`.
2929

3030
### Continuous Change Mode List Example
3131

src/vss_tools/utils/vhal/vhal_mapper.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,11 +411,13 @@ def __get_vhal_change_mode(self, node: VSSNode) -> int:
411411
:returns: change mode
412412
"""
413413
node_data = node.get_vss_data()
414-
if node_data.type == NodeType.ATTRIBUTE or node_data.type == NodeType.ACTUATOR:
414+
if node_data.type == NodeType.ATTRIBUTE:
415415
return VehiclePropertyChangeMode.STATIC.value
416-
elif node_data.type == NodeType.SENSOR and node.get_fqn() in self.__properties_with_continuous_change_mode:
416+
elif (
417+
node_data.type == NodeType.ACTUATOR or node_data.type == NodeType.SENSOR
418+
) and node.get_fqn() in self.__properties_with_continuous_change_mode:
417419
return VehiclePropertyChangeMode.CONTINUOUS.value
418-
elif node_data.type == NodeType.SENSOR:
420+
elif node_data.type == NodeType.ACTUATOR or node_data.type == NodeType.SENSOR:
419421
return VehiclePropertyChangeMode.ON_CHANGE.value
420422
else:
421423
logging.error(

0 commit comments

Comments
 (0)