-
-
Notifications
You must be signed in to change notification settings - Fork 1
Node Reference Logic
Bobby Comet edited this page Aug 1, 2026
·
4 revisions
Logic nodes take bindable inputs and expose one output. Chains evaluate in dependency order inside refresh_sources() each sensor refresh, before any visual reads them.
Kinds: KIND_NUMBER → number, KIND_PERCENT → percent, KIND_TEXT → text.
| Output | number |
| input_a, input_b | float, bindable |
| operation | enum — add, subtract, multiply, divide, average, min, max
|
| Notes | Divide-by-zero yields 0. |
| Output | number |
| input | bindable float |
| comparison | enum — >, >=, <, <=, == (default >) |
| threshold | float (default 80) |
| then_value / else_value | floats returned when condition holds / fails (defaults 1 / 0) |
| Output |
number (0 or 1) |
| value | bindable |
| comparison | enum (default >=) — >, >=, <, <=, ==
|
| threshold | float (default 80) |
| Notes | Binary gate only. Wire into opacity, Glow trigger, or Conditional. |
| Output | text |
| input | bindable (any kind) |
| template | string with {value} placeholder (default {value}) |
| decimals | int 0–4 (applies when input is numeric) |
| Output | number |
| value, in_min, in_max | bindable floats |
| out_min, out_max | floats (defaults 0 / 1) |
| clamp | bool (default true) — clamp result to out range |
| Notes | Remaps (value) from ([in_min, in_max]) → ([out_min, out_max]). Typical use: °C → 0–1 for a gauge, or sensor raw → percent. |
| Output | number |
| value | bindable |
| min_value, max_value | floats (defaults 0 / 100) |
| Output | number |
| a, b, t | bindable — result ≈ a + (b − a) × t
|
| t | typically 0–1 (editor allows wider range) |
| Output | number |
| value | bindable |
| centre | float (default 0) |
| radius | float (default 1) |
| Notes | If ( |
| Output | percent |
| value | bindable — typically 100 − value, clamped 0–100 |
| Notes | Free disk from used %, remaining battery style math. |
| Output | number |
| value | bindable |
| multiply, add | floats — value × multiply + add
|
| Output | number |
| value | bindable |
| decimals | int 0–6 (default 0 = integer) |
| Output | number |
| value | bindable — ` |
| Output |
number (0/1) |
| input_a, input_b | bindable — 1 if both non-zero, else 0 |
| Output |
number (0/1) |
| input_a, input_b | bindable — 1 if either non-zero, else 0 |
| Output | number |
| selector | bindable — if ≥ 0.5 output B, else A |
| input_a, input_b | bindable |
| Notes | Use with a Threshold Gate for mode switches. |
compute_used_sources walks backward from every edge (including through logic → logic chains). topological_order then ensures each node’s SRC[] entry is written only after its inputs are fresh this frame. Cycles fall back to a stable drain order rather than hanging the build.
| Need | Prefer |
|---|---|
| Simple 0/1 vs threshold | Built-in Threshold Gate |
| Pass value when true / invert / equal±ε | Plugin Threshold (if installed) |
| EMA / smoothing | Plugin Smooth |
| °F ↔ °C | Plugin Temp Convert or Map Range / Scale |
| Multi-stage index | Plugin Threshold Chain |