Back to Index

Definition: wswitch(target_expr, "label") — Allowed: expression target; best with assignable targets (variable, array element, out(...), actuator(...)).

Creates a switch widget. The current state is read from target_expr. Toggling writes 0 or 1 back to the target when it is writable.

Example

wpage("Control");
wswitch(manual_mode, "Manual");
wswitch(out(2), "OUT2");