Chassis settings
State
Driving mode
Declaration
getDrivingMode()
Example
val state:ChassisSettings.State
assertTrue(state.drivingMode.value == DrivingMode.ECO)
// Driving mode is set to ECO
Sport chrono
Declaration
getSportChrono()
Example
val state:ChassisSettings.State
assertTrue(state.sportChrono.value == ChassisSettings.SportChrono.ACTIVE)
// Sport Chrono is active
Current spring rates
Declaration
getCurrentSpringRates()
Discussion
The current values for the spring rates
Example
val state:ChassisSettings.State
assertTrue(state.currentSpringRates[0].value?.axle == Axle.FRONT)
assertTrue(state.currentSpringRates[0].value?.springRate?.value == 21.0)
assertTrue(state.currentSpringRates[0].value?.springRate?.unit == Torque.Unit.NEWTON_MILLIMETERS)
// Front axle spring rate is 21.0N/mm
Maximum spring rates
Declaration
getMaximumSpringRates()
Discussion
The maximum possible values for the spring rates
Example
val state:ChassisSettings.State
assertTrue(state.maximumSpringRates[0].value?.axle == Axle.FRONT)
assertTrue(state.maximumSpringRates[0].value?.springRate?.value == 37.0)
assertTrue(state.maximumSpringRates[0].value?.springRate?.unit == Torque.Unit.NEWTON_MILLIMETERS)
// Front axle maximum spring rate is 37.0N/mm
Minimum spring rates
Declaration
getMinimumSpringRates()
Discussion
The minimum possible values for the spring rates
Example
val state:ChassisSettings.State
assertTrue(state.minimumSpringRates[0].value?.axle == Axle.FRONT)
assertTrue(state.minimumSpringRates[0].value?.springRate?.value == 16.0)
assertTrue(state.minimumSpringRates[0].value?.springRate?.unit == Torque.Unit.NEWTON_MILLIMETERS)
// Front axle minimum spring rate is 16.0N/mm
Current chassis position
Declaration
getCurrentChassisPosition()
Discussion
The chassis position calculated from the lowest point
Example
val state:ChassisSettings.State
assertTrue(state.currentChassisPosition.value?.value == 25.4)
assertTrue(state.currentChassisPosition.value?.unit == Length.Unit.MILLIMETERS)
// Current chassis position is 25.4mm
Maximum chassis position
Declaration
getMaximumChassisPosition()
Discussion
The maximum possible value for the chassis position
Example
val state:ChassisSettings.State
assertTrue(state.maximumChassisPosition.value?.value == 55.5)
assertTrue(state.maximumChassisPosition.value?.unit == Length.Unit.MILLIMETERS)
// Maximum chassis position is 55.5mm
Minimum chassis position
Declaration
getMinimumChassisPosition()
Discussion
The minimum possible value for the chassis position
Example
val state:ChassisSettings.State
assertTrue(state.minimumChassisPosition.value?.value == -28.4)
assertTrue(state.minimumChassisPosition.value?.unit == Length.Unit.MILLIMETERS)
// Minimum chassis position is -28.4mm
Setters
Set driving mode
Declaration
public SetDrivingMode(DrivingMode drivingMode)
Example
val setDrivingMode = ChassisSettings.SetDrivingMode(DrivingMode.ECO)
Start stop sports chrono
Declaration
public StartStopSportsChrono(SportChrono sportChrono)
Example
val startStopSportsChrono = ChassisSettings.StartStopSportsChrono(ChassisSettings.SportChrono.ACTIVE)
Set spring rates
Declaration
public SetSpringRates(List<SpringRate> currentSpringRates)
Example
val setSpringRates = ChassisSettings.SetSpringRates(arrayListOf(
SpringRate(Axle.FRONT, Torque(21.0, Torque.Unit.NEWTON_MILLIMETERS)),
SpringRate(Axle.REAR, Torque(23.0, Torque.Unit.NEWTON_MILLIMETERS)))
)
Set chassis position
Declaration
public SetChassisPosition(Length currentChassisPosition)
Example
val setChassisPosition = ChassisSettings.SetChassisPosition(Length(25.4, Length.Unit.MILLIMETERS))
Getters
Get Chassis Settings property availability information
Declaration
public GetChassisSettingsAvailability()
public GetChassisSettingsAvailability(byte... propertyIdentifiers)
Example
// get all property availabilities
val getAvailability = GetChassisSettingsAvailability()
// get drivingMode and sportChrono property availabilities
val getAvailabilityProperties = GetChassisSettingsAvailability(0x01, 0x02)
Get chassis settings
Declaration
public GetChassisSettings()
public GetChassisSettings(byte... propertyIdentifiers)
Example
// get all properties
val getState = GetChassisSettings()
// get drivingMode and sportChrono properties
val getStateProperties = GetChassisSettings(0x01, 0x02)