Tell the APRS map which band it is on, and where you are standing
Three things wrong with the window, all reported from the chair in front of it, and all three the same kind of wrong: the map had been handed the aircraft map's furniture and nobody had checked which bits of it were about aircraft. The empty screen said "listening on 1090 MHz" and went on to explain that an aeroplane is placed once an even and an odd position frame have both arrived. That sentence was true of the window it was written for and false of every word in this one. What has to arrive before a mark can be placed is a fact about the signal rather than about the window, so it is now a thing the window is told: an aeroplane still says what an aeroplane needs, a station says that most of them mention where they are every few minutes, and left unsaid the words follow whatever channel the window was given rather than naming 1090 from memory. There was no red flag. The flag is drawn where the receiver was actually told it is, and this section has its own --at that had never been filled in -- but the aircraft section's had, by the same person, about the same aerial, on the same roof. One aerial does not move because the receiver was pointed at a different band, so a position set on either side now serves both, this section's own winning where it has one because two receivers in two places is exactly what a separate setting is for. It says out loud which it used, an inherited position being a convenience right up until somebody has moved and changed only one of them. The flag, the range rings and every distance and bearing all come from the same answer, so all four arrive together. The boxes drew a station's position and never wrote it down. A mark on a map shows where something is; the figures are what gets read out over the air, copied into a log or typed into something else. They are also the only place the doubt shows: a station that blanks its minutes is somewhere inside a two-degree square, the diamond is as definite there as it is anywhere, and only "49.0000N 72.0000W +/-340 km" admits it. Twelve new tests against six deliberately broken builds. One survived, and it is the one that matters: with the drawing code changed back to print aeroplanes at 1090 MHz, every test still passed, because they all read the sentence off the object and none of them read the pixels. That is the reported fault exactly -- a window that holds one sentence and paints another -- and the suite could not see it. It reads the picture now, cropped below the header, whose ticking clock has made a test pass for the wrong reason twice already this session. Full suite 2664 passed. Built as 2026-09-21_02. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
This commit is contained in:
parent
2c7b1ba25e
commit
e05b66ec3d
8 changed files with 295 additions and 36 deletions
|
|
@ -2255,3 +2255,50 @@ def test_a_symbol_that_points_turns_with_its_heading(app):
|
|||
north = _around_the_mark("vehicle", track=0.0)
|
||||
east = _around_the_mark("vehicle", track=90.0)
|
||||
assert int((north != east).any(axis=2).sum()) > 20
|
||||
|
||||
|
||||
@qt
|
||||
def test_an_empty_picture_says_what_it_is_waiting_for(app):
|
||||
"""What has to arrive before a mark can be placed is a fact about the
|
||||
signal, not about the window: an aeroplane needs two position frames of
|
||||
opposite parity, an amateur station needs to have mentioned where it is,
|
||||
and the window had the first of those written into it."""
|
||||
from bandsaunter.livemap import _build
|
||||
|
||||
plane = Sky()
|
||||
assert "1090 MHz" in plane.waiting and "position frame" in plane.waiting
|
||||
station = Sky(channel="144.39 MHz", fades=False,
|
||||
waiting="listening on 144.39 MHz\n\nnothing placed yet")
|
||||
assert "1090" not in station.waiting
|
||||
# And with nowhere to centre on, that is what gets drawn.
|
||||
assert station.centre() is None
|
||||
view = _build()["SkyView"](station)
|
||||
assert _painted(_rendered(view)) > 200
|
||||
|
||||
|
||||
@qt
|
||||
def test_the_waiting_words_follow_the_channel_when_none_are_given(app):
|
||||
assert "144.39 MHz" in Sky(channel="144.39 MHz").waiting
|
||||
|
||||
|
||||
@qt
|
||||
def test_the_empty_picture_draws_the_words_it_was_given(app):
|
||||
"""Holding the sentence is not the same as painting it. The complaint
|
||||
that started this was about what the window said while it waited, and a
|
||||
window that stores one sentence and draws another is that fault exactly
|
||||
-- so the test has to read the pixels, not the attribute."""
|
||||
from bandsaunter.livemap import _build
|
||||
|
||||
def below_the_header(sky):
|
||||
# Cropped past the header, whose clock ticks: two pictures taken a
|
||||
# moment apart differ up there for reasons that have nothing to do
|
||||
# with the words in the middle.
|
||||
return _rendered(_build()["SkyView"](sky))[60:, :, :]
|
||||
|
||||
plane = below_the_header(Sky())
|
||||
assert not (plane != below_the_header(Sky())).any(), "not steady"
|
||||
station = below_the_header(Sky(
|
||||
channel="144.39 MHz", fades=False,
|
||||
waiting="listening on 144.39 MHz\n\nnothing placed yet — a station "
|
||||
"appears\nonce it has said where it is"))
|
||||
assert int((plane != station).any(axis=2).sum()) > 200
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue