The View Hatswitch Setup building block is used to create a value that may control a Virtual Hatswitch building block. It interprets four individual values as directions, then combines those values to create a number that is typically associated with a view hatswitch.
A View Hatswitch Setup building block has four ON/OFF input values and one Number output value. The four input values are interpreted as "Forward" (FWD), "Backward" (BACK), "Left", and "Right". The output value is calculated from the input values using the following rules:
FWD | BACK | LEFT | RIGHT | OUTPUT |
---|---|---|---|---|
OFF | OFF | OFF | OFF | 0 |
ON | OFF | OFF | OFF | 1 |
ON | OFF | OFF | ON | 2 |
OFF | OFF | OFF | ON | 3 |
OFF | ON | OFF | ON | 4 |
OFF | ON | OFF | OFF | 5 |
OFF | ON | ON | OFF | 6 |
OFF | OFF | ON | OFF | 7 |
ON | OFF | ON | OFF | 8 |
If two opposite directions are both ON (for example both FWD and BACK), then those two inputs will cancel each other and neither will affect the output value.
A View Hatswitch Setup building block has no properties to configure.