The board repeats what the tick decided
Cyd's screenshot: the commit board's LAUNCH button lit - which requires the local pod to be staged - while the host's own row read 'connecting', which is the word for a state of -1. Two reads of the same fact from two places, disagreeing: the tick read the application state and armed on it, and the paint handler read it AGAIN, separately, and got something else. Why the paint's read returned -1 is not proven, and it does not need to be: re-deriving state at paint time was the mistake, the same one that broke five instruments in one night of the render-tick hunt. The tick already stores every state it acted on in gShownStates, for change detection - the paint now draws those values and reads nothing else. The board and the arming can no longer disagree, because they are the same read. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+15
-6
@@ -566,15 +566,24 @@ namespace
|
||||
// [pilots] order. READY rows bright, the rest dim, so
|
||||
// who the room is waiting on reads at a glance.
|
||||
//
|
||||
// Every state on this board comes from gShownStates -
|
||||
// the values the TICK stored when it decided whether to
|
||||
// arm - and nothing is re-read at paint time. The first
|
||||
// version re-read application->GetApplicationState()
|
||||
// here, and the host's own row said 'connecting' under
|
||||
// a lit LAUNCH button: two reads of one fact from two
|
||||
// places, disagreeing - the exact mistake behind five
|
||||
// broken instruments in one night of this project. One
|
||||
// frame of reference: the tick decides, the paint
|
||||
// repeats what it decided.
|
||||
//
|
||||
char text[96];
|
||||
int local_state = (application != NULL)
|
||||
? application->GetApplicationState() : -1;
|
||||
|
||||
sprintf(text, "%-14s %s",
|
||||
(gPilotNameCount > 0) ? gPilotNames[0] : "HOST",
|
||||
StateWord(local_state));
|
||||
StateWord(gShownStates[0]));
|
||||
SetTextColor(mem,
|
||||
(local_state == Application::WaitingForLaunch)
|
||||
(gShownStates[0] == Application::WaitingForLaunch)
|
||||
? kBoardGreen : kBoardGreenDim);
|
||||
DrawTextA(mem, text, -1, &line,
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE);
|
||||
@@ -588,9 +597,9 @@ namespace
|
||||
? gPilotNames[i + 1] : gRemotePods[i].address;
|
||||
|
||||
sprintf(text, "%-14s %s", name,
|
||||
StateWord(gRemotePods[i].state));
|
||||
StateWord(gShownStates[i + 1]));
|
||||
SetTextColor(mem,
|
||||
(gRemotePods[i].state == Application::WaitingForLaunch)
|
||||
(gShownStates[i + 1] == Application::WaitingForLaunch)
|
||||
? kBoardGreen : kBoardGreenDim);
|
||||
DrawTextA(mem, text, -1, &line,
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE);
|
||||
|
||||
Reference in New Issue
Block a user