VehicleGUI

VehicleGUI

new VehicleGUI(window, x, y, drive_sideopt)

Description:
  • Class to define a Vehicle GUI and button behaviour with a name supplier product and version number to extract the data for the measurement
Source:
Example
let vehicle = new VehicleGUI(gui.wdw_pre_automotive, 97, 16);
Parameters:
Name Type Attributes Default Description
window any Window to place vehicle gui on
x number left coordinate of vehicle (on parent window)
y number top coordinate of vehicle (on parent window)
drive_side string <optional>
VehicleOccupant.LHD left hand drive (VehicleOccupant.LHD) by default or right hand drive (VehicleOccupant.RHD).

Methods

(static) AddVehicleToGUI(window, x, y)

Source:
Parameters:
Name Type Description
window any gui window on which to place the vehicle gui
x number left coordinate of vehicle (on parent window)
y number top coordinate of vehicle (on parent window)

GetButton(side, front_rear) → {Widget}

Description:
  • returns the button widget based on the seat side and row
Source:
Parameters:
Name Type Description
side string
front_rear string
Returns:
Type
Widget

GetCategory(vehicle_occupant) → {string}

Description:
  • get the category of the button based on if an existing occupant has been defined for the corresponding seat and if it is a valid (and supported) occupant
Source:
Parameters:
Name Type Description
vehicle_occupant VehicleOccupant
Returns:
Type
string

Update()

Description:
  • occupant buttons are set based on the current protocol selected and the existing occupant(s) defined.
Source:

UpdateOccupantButtons(vehicle)

Source:
Parameters:
Name Type Description
vehicle ProtocolVehicle Protocol vehicle