From 04f72d4e3f07fafce555bbf59e5ea9cb55a71ac6 Mon Sep 17 00:00:00 2001 From: Cyd Date: Mon, 10 Aug 2026 17:39:01 -0500 Subject: [PATCH] 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) --- MUNGA_L4/L4VB16.cpp | 32 +++++++++++++++++++++++++------- RP_L4/RPL4ENVIRON.cpp | 13 +++++++++++++ 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/MUNGA_L4/L4VB16.cpp b/MUNGA_L4/L4VB16.cpp index cb888e2..cbf0f3f 100644 --- a/MUNGA_L4/L4VB16.cpp +++ b/MUNGA_L4/L4VB16.cpp @@ -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; } diff --git a/RP_L4/RPL4ENVIRON.cpp b/RP_L4/RPL4ENVIRON.cpp index 09f8d14..ad65440 100644 --- a/RP_L4/RPL4ENVIRON.cpp +++ b/RP_L4/RPL4ENVIRON.cpp @@ -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"