Hardware Reference
In-Depth Information
N You always affect the master volume, not the individual device volumes. This is so the relative volumes of the
radio, CD, or MP3s aren't changed, and the only inaccuracy occurs at the top and bottom of a single range—that of
the master volume.
Note
The state-based controller is a little more involved. It consists of four predefined buttons to query and change
the state and eight that are mode-specific. This is configured as follows:
SCRIPT cosmic7 on :: /usr/local/minerva/bin/cosmic default modestatus
SCRIPT cosmic7 off :: /usr/local/minerva/bin/cosmic default nextmode
SCRIPT cosmic8 on :: /usr/local/minerva/bin/vstatus
SCRIPT cosmic8 off :: /usr/local/minerva/bin/cosmic default clear
Notice that you cycle through the modes in only one direction because this sequence is easier to remember. Also,
you have used what would have been a previous button to reset Cosmic to its initial state. The modestatus report
reminds you where you are in the cycle, lest you forget, and there's a general-purpose status report to even up the rows.
This assignment is specific to devices laid out in two columns like the HR10, which have the on button on the left.
This allows you to line up both status reports on the left side and separate the two sets of global buttons into media
at the top and Cosmic state at the bottom. Notice that the software within Linux never changes, only the configuration.
To control the Cosmic system, you assign the remaining buttons to arbitrary c1 , c2 , and so on, commands.
SCRIPT cosmic3 on :: /usr/local/minerva/bin/cosmic default c1
SCRIPT cosmic3 off :: /usr/local/minerva/bin/cosmic default c2
SCRIPT cosmic4 on :: /usr/local/minerva/bin/cosmic default c3
SCRIPT cosmic4 off :: /usr/local/minerva/bin/cosmic default c4
SCRIPT cosmic5 on :: /usr/local/minerva/bin/cosmic default c5
SCRIPT cosmic5 off :: /usr/local/minerva/bin/cosmic default c6
SCRIPT cosmic6 on :: /usr/local/minerva/bin/cosmic default c7
SCRIPT cosmic6 off :: /usr/local/minerva/bin/cosmic default c8
As you can see, the cosmic script is technically stateless, so you must use the /var/log/minerva/cosmic directory
to hold the current mode.
N Because the heyu daemon needs to be restarted after any change to x10.conf , you can improve the
maintenance aspect of this script by redirecting all Cosmic scripts to an indirect form, through the invocation of a script
such as /usr/local/minerva/bin/cosmic default base1 .
Note
Creating Modes
You then have the fun (!?) part of designing the states and their interfaces. The Cosmic system places no limits on
the number of modes possible or how the commands inside them must function. However, it is recommended that
every button press result in some kind of feedback, either directly because something happened as a consequence of
the command (such as a light turning on or some music playing) or indirectly with auditory feedback to indicate the
command happened, although it was invisible to you.
 
Search WWH ::




Custom Search