PxVehicleGearboxState

Defined in include/vehicle2/drivetrain/PxVehicleDrivetrainStates.h

struct PxVehicleGearboxState

Public Functions

inline void setToDefault()

Public Members

PxU32 currentGear

Current gear.

PxU32 targetGear

Target gear (different from current gear if a gear change is underway)

PxReal gearSwitchTime

Reported time that has passed since gear change started.

The special value PX_VEHICLE_NO_GEAR_SWITCH_PENDING denotes that there is currently no gear change underway.

If a gear switch was initiated, the special value PX_VEHICLE_GEAR_SWITCH_INITIATED will be used temporarily but get translated to 0 in the gearbox update immediately. This state might only get encountered, if the vehicle component update is split into multiple sequences that do not run in one go.

Unit: time