Skip to content

DelayedBoolMaterialDriver

Inheritance 4 ancestors · 50 siblings

Class Documentation

Edit documentation

A bool driver that follows mBoolDriver with a delay. When the input turns true, the output turns true mDelayOn seconds later. When the input turns false, the output turns false mDelayOff seconds later.

The driver keeps one state per source:

State Output Leaves the state when
On true the input turns false: to pending off, or to off if mDelayOff is 0
Off false the input turns true: to pending on, or to on if mDelayOn is 0
Pending on false mDelayOn seconds have passed: to on. The input turns false: back to off
Pending off true mDelayOff seconds have passed: to off. The input turns true: back to on

The first evaluation for a source sets the state to on or off from the input at once, with no delay.

A change of the input that ends before the delay has passed is ignored, so the driver also filters out short flickers of the input.

Properties

mDelayOff

F32 = 0
Edit documentation

The time, in seconds, that the input must stay false before the output turns false.

mDelayOn

F32 = 0
Edit documentation

The time, in seconds, that the input must stay true before the output turns true.