Update for radar testing and operation and added first component .md file

This commit is contained in:
2026-06-13 22:14:09 -07:00
parent 3711121e0f
commit 0d95fac945
5 changed files with 101 additions and 21 deletions

View File

@@ -123,10 +123,10 @@ constexpr int RADAR_COUNT = 5; // valid indices: 1-4; 0 is unused
* Components: Thread 1 (startup init, scope switching),
* Traffic Cop (Thread 2, range filtering) */
struct radar_management_structure {
int testing; // 1 = radar component is under development/testing, 0 = not in testing
int operatable; // 1 = radar is built and fully functional, 0 = not yet built
int available; // 1 = enabled by exhibit operator at startup, 0 = disabled
int selected; // 1 = currently active/displayed, 0 = not active
int radar_type; // RADAR_* constant identifying which radar this entry represents
int operatable; // 1 = radar is built and fully functional, 0 = not yet built
int available; // 1 = enabled by exhibit operator at startup, 0 = disabled
int selected; // 1 = currently active/displayed, 0 = not active
};
// Array of radar states, indexed by RADAR_* constants.
@@ -139,6 +139,26 @@ extern radar_management_structure radar_management[RADAR_COUNT];
// Components: Thread 1, Traffic Cop (Thread 2), all scope renderers
extern int current_radar;
/* Component identifiers for testing_component.
* When testing_component is non-zero, only that component is active and
* no other radars can be made available.
* Values 2-5 correspond to RADAR_* constants for the four radar types.
* Components: Thread 1 (startup), all components that gate on test mode */
constexpr int TESTING_NONE = 0; // normal exhibit operation
constexpr int TESTING_MANAGEMENT = 1; // setup and radar selection (this module)
constexpr int TESTING_CHAIN_HOME = 2; // chain home A-scope
constexpr int TESTING_MARINE_ASCOPE = 3; // marine A-scope
constexpr int TESTING_MARINE_TRAFFIC = 4; // marine traffic control PPI
constexpr int TESTING_POLICE_BOAT = 5; // police boat PPI
constexpr int TESTING_TRAFFIC_COP = 6; // traffic cop (Thread 2)
constexpr int TESTING_SIMULATOR = 7; // simulator (Thread 3)
constexpr int TESTING_RASPBERRY_PI = 8; // raspberry pi receiver (Thread 5)
// Active component under development; initialized from TESTING_COMPONENT in settings.h.
// Set to TESTING_NONE for normal exhibit operation.
// Components: Thread 1 (startup gating), all components
extern int testing_component;
/* ============================================================
* THREAD MUTEXES
* Defined in global_data.cpp; extern declared here.

View File

@@ -35,6 +35,28 @@
#pragma once
/* ============================================================
* TESTING MODE
* Component: all components (read at startup by Thread 1)
* ============================================================ */
/*
* Set to a TESTING_* constant to put the exhibit in single-component
* test mode. When non-zero, only the named component is active and
* no other radars can be made available.
*
* TESTING_NONE = 0 normal exhibit operation
* TESTING_MANAGEMENT = 1 setup and radar selection
* TESTING_CHAIN_HOME = 2 chain home A-scope
* TESTING_MARINE_ASCOPE = 3 marine A-scope
* TESTING_MARINE_TRAFFIC = 4 marine traffic control PPI
* TESTING_POLICE_BOAT = 5 police boat PPI
* TESTING_TRAFFIC_COP = 6 traffic cop (Thread 2)
* TESTING_SIMULATOR = 7 simulator (Thread 3)
* TESTING_RASPBERRY_PI = 8 raspberry pi receiver (Thread 5)
*/
#define TESTING_COMPONENT TESTING_NONE
/* ============================================================
* GENERAL / OPENGL DEBUG
* Component: Thread 1 (initialization)