A camera's map is placed by its own knob

The host picks Racer or Live Cam from the setup screen, so the two roles
cannot share one placement setting - switching would mean editing
environ.ini every time, which is not a thing to ask of anyone. L4MAPPOS
places the camera's map and L4MAPSCALE sizes it, taking the same values as
L4RADARPOS and L4RADARSCALE and defaulting to the bottom-left corner. A
pod keeps its own pair and its dead-centre default, which is where the
cabinet had it. Each role remembers its own; one file serves both.

The scale is split for the same reason as the position: a host who wanted
a bigger map while camming would otherwise have hit exactly the same
problem the next time out.

The log now names which variable it read - "map on the bottom left
(L4MAPPOS)" - because a setting that silently loses to another one is how
this went unnoticed in the first place. Both new keys are in the shipped
environ.ini template, so they are discoverable without reading the source.

Nothing to edit on an existing install: a file with L4RADARPOS set and no
L4MAPPOS gives the pod its centre and the camera its corner.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-08-10 17:39:01 -05:00
co-authored by Claude Opus 5
parent 1cd8911df0
commit 04f72d4e3f
2 changed files with 38 additions and 7 deletions
+25 -7
View File
@@ -3988,10 +3988,18 @@ static RadarPlacement
// camera station defaults to the bottom-left corner instead.
// L4RADARPOS still overrides either way.
//
cached = Application::IsCameraStation()
? RadarBottomLeft : RadarBottomCenter;
// A pod and a Live Cam want this display in different places, and
// the same host does both from one menu - so they get a knob each
// and neither has to be edited when the role changes. L4RADARPOS
// places the pod's radar, L4MAPPOS the camera's map. Defaults
// differ too: dead centre under the viewscreen is where the
// cabinet had it, and the worst place to put a panel on a shot.
const Logical camera_station = Application::IsCameraStation();
const char *variable = camera_station ? "L4MAPPOS" : "L4RADARPOS";
const char *text = getenv("L4RADARPOS");
cached = camera_station ? RadarBottomLeft : RadarBottomCenter;
const char *text = getenv(variable);
if (text != NULL)
{
for (int i = 0; i < (int) (sizeof(names) / sizeof(names[0])); ++i)
@@ -4012,8 +4020,9 @@ static RadarPlacement
"left side, centred",
"right side, centred"
};
DEBUG_STREAM << "SVGA16: radar on the " << described[cached]
<< "\n" << std::flush;
DEBUG_STREAM << "SVGA16: " << (camera_station ? "map" : "radar")
<< " on the " << described[cached]
<< " (" << variable << ")\n" << std::flush;
}
return (RadarPlacement) cached;
}
@@ -4051,14 +4060,23 @@ void
DisplayScalePercent("L4MFDSCALE_LL", group);
percent[SplitMFDLowerRight] =
DisplayScalePercent("L4MFDSCALE_LR", group);
percent[SplitMap] = DisplayScalePercent("L4RADARSCALE", 100);
//
// Sized by its own knob for the same reason it is placed by one: a
// camera's map and a pod's radar are the same pane doing different
// jobs, and the host switches between them from the menu without
// touching this file.
//
percent[SplitMap] = Application::IsCameraStation()
? DisplayScalePercent("L4MAPSCALE", 100)
: DisplayScalePercent("L4RADARSCALE", 100);
DEBUG_STREAM << "SVGA16: secondary displays at UL "
<< percent[SplitMFDUpperLeft] << "% UC "
<< percent[SplitMFDUpperCenter] << "% UR "
<< percent[SplitMFDUpperRight] << "% LL "
<< percent[SplitMFDLowerLeft] << "% LR "
<< percent[SplitMFDLowerRight] << "% radar "
<< percent[SplitMFDLowerRight] << "% "
<< (Application::IsCameraStation() ? "map " : "radar ")
<< percent[SplitMap] << "%\n" << std::flush;
}
+13
View File
@@ -165,6 +165,19 @@ namespace
"# both of them, and it grows from the middle in both directions).\n"
"L4RADARPOS=CENTER\n"
"\n"
"# The same pane as a LIVE CAM, which is a different job: no pod, so no\n"
"# instrument MFDs beside it, the map lies down landscape instead of the\n"
"# pod's portrait mounting, and dead centre is the worst place to put a\n"
"# panel on a shot. It therefore has its own position and size, taking\n"
"# the same values as L4RADARPOS / L4RADARSCALE above and defaulting to\n"
"# the bottom-left corner.\n"
"#\n"
"# Two settings rather than one on purpose: the host picks Racer or Live\n"
"# Cam from the setup screen, so switching role must not mean editing\n"
"# this file. Each role remembers its own.\n"
"L4MAPPOS=LEFT\n"
"L4MAPSCALE=100\n"
"\n"
"# The Winners Circle: at the end of a race the finishers are stood on\n"
"# the award platform in finishing order, with each pilot's callsign on\n"
"# the plate beside their spot, and held there for a few seconds before\n"