Fifth Wheel Coupling
Controls the fifth wheel coupling mechanism on tractor units. Manages the locking jaw that secures the trailer kingpin, detecting connection state and providing lock/unlock functionality.
Controls the fifth wheel coupling mechanism on tractor units. Manages the locking jaw that secures the trailer kingpin, detecting connection state and providing lock/unlock functionality.
Public API
| Function | Description |
|---|---|
detachFifthwheel() | Manually triggers the decoupling of the current trailer. |
setFifthwheelIndicatorVisibility(visible) | Toggles visual indicators for the tractor's coupling point and requests nearby trailers to show their kingpins. |
module.initSounds(jbeamData) | Initializes sound resources. |
module.onCouplerFound(nodeId, obj2id, obj2nodeId) | print("found") |
module.isAttached() | Checks if attached. |
module.toggleFifthwheelIndicatorVisibility() | Toggles fifthwheel indicator visibility. |
Hooks
| Hook | Description |
|---|---|
init(jbeamData) | Identifies the coupling node and physical properties (radius, strength) from JBeam. |
updateGFX(dt) | Polls nearby vehicles for compatible kingpins and manages the multi-stage state machine (detached, attaching, attached, detaching). |
onCouplerAttached(nodeId, obj2id, obj2nodeId, attachForce) | Callback when a physical connection is made. Triggers sounds and updates status electrics. |
onCouplerDetached(nodeId, obj2id, obj2nodeId, breakForce) | Callback when the connection is severed. |
module.reset(jbeamData) | Resets the controller to its initial state. |
See Also
- Kingpin — Trailer-side kingpin controller
- Advanced Coupler Control — Automated coupling logic
Transbrake
Controls a transmission-based launch device that locks the output shaft by simultaneously engaging forward and reverse gears. Used in drag racing to hold the vehicle stationary against full engine power, enabling maximum-effort launches when released.
Kingpin Coupling
Controls the kingpin assembly on the trailer side of a fifth-wheel coupling. Manages the coupling interface that mates with the tractor's fifth wheel plate.