updateVehicleProperties

abstract fun updateVehicleProperties(vehicleProperties: List<VehicleProperty>)

Updates the properties of the vehicle. The only properties that can be updated are those defined by the currently set vehicle.

Example snippet that updates the current charge of the electric vehicle's engine to 42kWh:

val updatedElectricEngineProperties = ElectricEngineProperties(
listOf(
CurrentChargeProperty(Energy.kilowattHours(42))
)
)
vehicleProvider.updateVehicle(listOf(updatedElectricEngineProperties))

Parameters

vehicleProperties

List of updated vehicle properties.

Throws

When trying to update a vehicle property that was not defined by the currently set vehicle, or if the vehicle would be in an inconsistent state after the update.