diff --git a/RP_L4/RPL4CONSOLE.cpp b/RP_L4/RPL4CONSOLE.cpp index 85ecdbb..7421e59 100644 --- a/RP_L4/RPL4CONSOLE.cpp +++ b/RP_L4/RPL4CONSOLE.cpp @@ -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);