File: Part_On_Off.txt

package info (click to toggle)
yoshimi 2.3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,012 kB
  • sloc: cpp: 62,589; xml: 97; sh: 94; python: 45; makefile: 14
file content (14 lines) | stat: -rw-r--r-- 727 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
This control has a degree of intelligence built in.

If a part is on, then sending 0 will switch it off and sending 1 will switch it back
on. These are absolute actions used mostly when doing resets, state and patch set
loads etc.

If you send -1 when it was on, it will again switch it off. However if it was
already off, sending -1 will set the internal counter to -1. Yet another -1 will set
-2 etc. Anything less than 1 is regarded as off. If you later send 2 the counter
will be stepped up again. In this way, if several routines switch a part off it will
only be switched back on again when all of them switch it on.

The counter has a maximum value of 1, so repeatedly sending 2 once the part is on
will have no effect.