From 654f1711a32b424a037736d81014febf071a1549 Mon Sep 17 00:00:00 2001 From: Andre Weber Date: Thu, 2 Nov 2023 13:13:59 +0100 Subject: [PATCH] chore: Remove FIELD_PATH from Field Types --- .../databroker/viewmodel/VssPropertiesViewModel.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/src/main/kotlin/org/eclipse/kuksa/testapp/databroker/viewmodel/VssPropertiesViewModel.kt b/app/src/main/kotlin/org/eclipse/kuksa/testapp/databroker/viewmodel/VssPropertiesViewModel.kt index fb5c23c6..cf153143 100644 --- a/app/src/main/kotlin/org/eclipse/kuksa/testapp/databroker/viewmodel/VssPropertiesViewModel.kt +++ b/app/src/main/kotlin/org/eclipse/kuksa/testapp/databroker/viewmodel/VssPropertiesViewModel.kt @@ -48,9 +48,7 @@ class VSSPropertiesViewModel : ViewModel() { private set val valueTypes: List = ValueCase.values().toList() - val fieldTypes: List = Field.values().toList() - .filterNot { it.toString().contains(EXCLUDED_FIELD_TYPES) } - .minus(listOf(Field.FIELD_UNSPECIFIED, Field.UNRECOGNIZED)) // Not relevant field types + val fieldTypes: List = listOf(Field.FIELD_VALUE, Field.FIELD_ACTUATOR_TARGET) val datapoint: Datapoint get() = vssProperties.valueType.createDatapoint(vssProperties.value) @@ -62,10 +60,6 @@ class VSSPropertiesViewModel : ViewModel() { fun updateVssProperties(vssProperties: VSSProperties = VSSProperties()) { this.vssProperties = vssProperties } - - companion object { - const val EXCLUDED_FIELD_TYPES = "METADATA" - } } @Immutable @@ -73,5 +67,5 @@ data class VSSProperties( val vssPath: String = "Vehicle.Speed", val valueType: ValueCase = ValueCase.VALUE_NOT_SET, val value: String = "130", - val fieldType: Field = Field.FIELD_UNSPECIFIED, + val fieldType: Field = Field.FIELD_VALUE, )