Skip to content

Commit

Permalink
chore: Remove FIELD_PATH from Field Types
Browse files Browse the repository at this point in the history
  • Loading branch information
wba2hi committed Nov 3, 2023
1 parent 3c2428b commit 654f171
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ class VSSPropertiesViewModel : ViewModel() {
private set

val valueTypes: List<ValueCase> = ValueCase.values().toList()
val fieldTypes: List<Field> = Field.values().toList()
.filterNot { it.toString().contains(EXCLUDED_FIELD_TYPES) }
.minus(listOf(Field.FIELD_UNSPECIFIED, Field.UNRECOGNIZED)) // Not relevant field types
val fieldTypes: List<Field> = listOf(Field.FIELD_VALUE, Field.FIELD_ACTUATOR_TARGET)

val datapoint: Datapoint
get() = vssProperties.valueType.createDatapoint(vssProperties.value)
Expand All @@ -62,16 +60,12 @@ class VSSPropertiesViewModel : ViewModel() {
fun updateVssProperties(vssProperties: VSSProperties = VSSProperties()) {
this.vssProperties = vssProperties
}

companion object {
const val EXCLUDED_FIELD_TYPES = "METADATA"
}
}

@Immutable
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,
)

0 comments on commit 654f171

Please sign in to comment.