hu
Bejelentkezés

← Vissza az API-referenciához

Input A feedback address

A feedback address on your command station or feedback module: of a detector, or of a push button or switch on the layout. You make it with input(number).

Mire: For push buttons and switches on the layout that are not a block: a button that sets a route, a switch for night mode.

input(12).onOn {
   route(blocks.B1, blocks.B4).set()
}

Tulajdonságok

on → boolean

Whether it is on now.

Whether the address is on now. Asked live.

if (input(20).on) {
   flag("night").on()
}

Események

onOn → Input

When it goes on.

Fires when the address goes on (the button is pressed, the detector occupied).

input(12).onOn {
   log "on"
}

onOff → Input

When it goes off.

Fires when the address goes off.

input(12).onOff {
   log "off"
}