Diag: BT_TEMPBAR_LOG -- verify the subsystem temperature-bar cluster renders live
Logs each SubsystemCluster::Execute's drawn CurrentTemperature vs the degradation/ failure thresholds + drawState. Confirmed (BT_DEV_GAUGES + madcat + autofire): the per-subsystem temperature bars build lazily on the engineering MFD screen, execute live with animating values (weapons heat toward the 1000K degradation line = the jam threshold) and correct 1000/2000 markers, drawState=0 online. No behavior change (env). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
da80727467
commit
c4c51545fc
@@ -1411,6 +1411,21 @@ void SubsystemCluster::Execute()
|
||||
failedState = (BTSubsystemDamageLevelOf(subsystem) >= 1.0f);
|
||||
}
|
||||
|
||||
if (getenv("BT_TEMPBAR_LOG"))
|
||||
{
|
||||
Scalar *t = (Scalar *)AttributePointerOf(subsystem, "CurrentTemperature");
|
||||
Scalar *dg = (Scalar *)AttributePointerOf(subsystem, "DegradationTemperature");
|
||||
Scalar *fl = (Scalar *)AttributePointerOf(subsystem, "FailureTemperature");
|
||||
static int s_tbN = 0;
|
||||
if (t != 0 && ((++s_tbN) % 30) == 0)
|
||||
DEBUG_STREAM << "[tempbar] cluster EXECUTING "
|
||||
<< (subsystem ? ((Subsystem *)subsystem)->GetName() : "?")
|
||||
<< " T=" << *t
|
||||
<< " degT=" << (dg ? *dg : -1.0f)
|
||||
<< " failT=" << (fl ? *fl : -1.0f)
|
||||
<< " drawState=" << GetDrawState() << "\n" << std::flush;
|
||||
}
|
||||
|
||||
int state = GetDrawState();
|
||||
if (state != previousDrawState)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user