Files
CC-StationBroadcast/debug-upcoming-data-missing.md

20 lines
998 B
Markdown

[OPEN] upcoming-data-missing
## Symptom
- Monitor shows `NONE / WAITING DATA` under `UPCOMING TRAINS`.
- Expected: list of upcoming trains parsed from CRN advanced display NBT (TrainStops).
## Hypotheses (falsifiable)
1. `Peripherals.blockReader` is not detected (wrong peripheral type string / not connected to this computer).
2. `blockReader.getBlockData()` succeeds but returns a table without `TrainStops` (block reader is pointing at the wrong block or advanced display data not present).
3. `TrainStops` exists but is not an array (non-numeric keys), so `ipairs()` iteration yields 0 rows.
4. `TrainStops` exists but the code path exits before assigning `State.upcomingTrains`.
## Evidence to collect (instrumentation)
- Whether blockReader/create_target are detected.
- Whether getBlockData succeeds.
- Whether TrainStops exists and how many rows it contains (ipairs count vs pairs count).
## Next action
- Add runtime instrumentation to display these values on the monitor and in logs.