BT410 5.3.132: the watchers finally see something -- every watch link in the mech gets bound, and the gyro's complaint narrows to a brownout
The gap found in 5.3.131 is closed. HeatWatcher has always streamed a
watchedSubsystem index and read it into a member; nothing ever turned it
into the link UpdateWatch resolves, so the entire watcher family --
PowerWatcher and the Gyroscope / Torso / HUD / AmmoBin leaves included --
resolved NULL and reported its target dead.
The Mech ctor now binds them in a post-walk pass, which is where it has
to be: a watcher may legally watch a subsystem with a higher roster id,
which does not exist yet while the segment walk is still building.
Out-of-range and self-referencing indices are skipped rather than
trusted.
THE BINDINGS PROVE THEMSELVES -- every index lands on a semantically
right target, which a wrong offset could not manage:
Gyroscope -> Avionics Torso -> Myomers
HUD -> Avionics Searchlight -> Avionics
AmmoBinAFC100 -> AFC100 AmmoBinLRM15_1 -> LRM15_1
AmmoBinLRM15_2 -> LRM15_2
The gyro and HUD watch the avionics bus, the torso watches the muscles
that move it, and every ammo bin watches its own gun.
With the link live the gyro's watchdog moved off the NULL fallback (0 ->
1) but has not reached Ready. UpdateWatch can produce 1 two ways --
NoVoltage, or a brownout on a target that IS ready -- and since Avionics
is a Sensor reporting voltState 4, the brownout branch is the suspect.
Recorded as the next question with the experiment that separates the two
causes, rather than quieting an alarm by moving a threshold.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -598,6 +598,51 @@ Mech::Mech(
|
||||
}
|
||||
RedistributeCoolantShares();
|
||||
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
// THE WATCH BINDS (5.3.132). Every HeatWatcher descendant -- which is
|
||||
// the whole watcher family, PowerWatcher and the Gyroscope / Torso / HUD
|
||||
// leaves included -- streams the roster index of the subsystem it
|
||||
// watches, and `UpdateWatch` resolves a link built from it. Nothing
|
||||
// ever built that link, so every watcher resolved NULL and reported its
|
||||
// target unpowered / stone cold.
|
||||
//
|
||||
// This runs POST-WALK, not in the watcher ctor: a watcher may legally
|
||||
// watch a subsystem with a higher roster id, which does not exist yet
|
||||
// while the walk is still building. Out-of-range and self-referencing
|
||||
// indices are skipped rather than trusted.
|
||||
//-----------------------------------------------------------------------
|
||||
//
|
||||
{
|
||||
for (int wb = 2; wb < subsystemCount; ++wb)
|
||||
{
|
||||
Subsystem *watcher = subsystemArray[wb];
|
||||
if (
|
||||
watcher == NULL ||
|
||||
!watcher->IsDerivedFrom(HeatWatcher::ClassDerivations)
|
||||
)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
int index = ((HeatWatcher *)watcher)->WatchedSubsystemIndex();
|
||||
Subsystem *watched =
|
||||
(index >= 2 && index < subsystemCount && index != wb)
|
||||
? subsystemArray[index]
|
||||
: NULL;
|
||||
|
||||
((HeatWatcher *)watcher)->BindWatchedSubsystem(watched);
|
||||
|
||||
if (getenv("BT_MECH_LOG"))
|
||||
{
|
||||
DEBUG_STREAM << "[watch] '" << watcher->GetName()
|
||||
<< "' watches index " << index << " -> "
|
||||
<< ((watched != NULL) ? watched->GetName() : "(unbound)")
|
||||
<< endl << flush;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
// THE MYOMER CHAIN (binary ctor sweep, part_012.c:15871: the mech+0x7ac
|
||||
|
||||
Reference in New Issue
Block a user