fix(spid): a Rot1Prog takes three digits, so every target went the wrong way
Field report from a tower: on a RAK/RAU in Rot1Prog, every commanded heading made the antenna want to turn nearly a full circle ANTICLOCKWISE — 0°, 90°, any of them — while the heading readout, the stop button and everything else worked. BuildSet framed the four-digit Rot2Prog azimuth for both dialects. A Rot1Prog reads three: its replies are three digits in a five-byte frame, and its command field matches. So 90° went out as "0450" and was read as 045 — 45 − 360 = −315°. Every target landed 360° low, which is why it was always anticlockwise and always nearly a full turn. The operator's own guess, that OpsLog was in 720° mode, was the right instinct in the wrong place: the fault is a decimal shift, not a range. The round-trip test added here is the one that would have caught it without a tower — every degree of the circle through the command builder and back through the reply parser, which must return the degree that went in. The frame tests pinned the Rot2Prog form against the reference and said nothing about the other dialect. Two more from the same report. A rotator test that only READS the heading — SPID, ARCO, DCU-1 — said "Packet sent, the antenna should swing to north, check PstRotator's UDP listener", naming a program not in the path for a move never commanded; it now says the controller answered and nothing was moved. And the compass polled every three seconds, so a turning antenna moved the needle in steps of about thirteen degrees; the heading now has its own 700 ms tick while the relay boards and the antenna controller stay at three seconds.
This commit is contained in:
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user