Steve,
You got the order pretty good. With the logic, I find I do a save of the
panel after the discover, then exit JMRI and restart, and load the file.
What I think is happening when the discover runs is the order of the logic
getting built and running, some parts aren't being run yet. On a panel load
at the start, everything gets started together and it settles down right.
The other thing I do most of the time is run the discover twice. The thought
was that first time through, it processes one part of the layout and doesn't
see what hasn't been created in the other part yet. So the second time
around insures everything is seen. But I have no logical proof this matters,
just habit.
Any track you want protected needs to be in a block. But not all blocks have
to be real. Here is an example. At one layout, we didn't detect the turnouts
as being part of a block. I used internal sensors (all set to INACTIVE) and
made them for the block of just the turnout. This let me place the masts
around the turnout. I'm trying to convince the owner that we should detect
the turnouts and use that to prevent changing the turnout while it is
occupied, but that might be something we wire up later.
-Ken Cameron, Member JMRI Dev Team
www.jmri.org
www.fingerlakeslivesteamers.org
www.cnymod.com
www.syracusemodelrr.org