|
LCC Fusion Project 1.0
LCC Automation
|
Firmware for the LCC Fusion BSD (Block Short Detection) Card. More...

Files | |
| file | BsdRelay.h |
| Per-channel Block Short Detection (BSD) relay control. | |
| file | config.h |
| Configuration constants and pin assignments for the UOD Card firmware. | |
Classes | |
| struct | SensorRange |
| Per-card occupancy thresholds (mA) for each sensor on a BSD Card. More... | |
| class | BsdSensor |
| Encapsulates one BSD channel (sense + decision + actuation). More... | |
Enumerations | |
| enum class | SensorState : uint8_t { SensorState::OK = 0 , SensorState::TRIPPED = 1 , SensorState::LOCKOUT = 2 } |
| Sensor finite-state machine states. More... | |
Functions | |
| static void | onI2cRequest () |
| I²C on-request: write a 2-byte frame [OCC_lo, SHORT_hi]. More... | |
| void | setupHelpCallback () |
| Register help/usage text for this card (shown on user request). More... | |
| void | setupTestCallback () |
| Install the test callback for the Card commands. More... | |
| void | setupProgramCallback () |
| Install the progam callback for the Card commands. | |
| void | getSensorRanges () |
| Parse up to NUM_BSD_SENSORS_PER_CARD "< low_mA high_mA ... >" pairs and update thresholds. Rules: More... | |
| void | setup () |
| Arduino setup: configures ADC, sensors, relays, and I²C target mode. More... | |
| void | loop () |
| Arduino loop: advances each sensor; all host-visible bits are derived on demand. More... | |
Variables | |
| static BsdSensor | sensors [NUM_BSD_SENSORS_PER_CARD] |
| Relays (level-driven MOSFET gates). | |
| static SensorRange | sensorRanges |
| Zero-initialized instance (or make this a class member). | |
| static constexpr uint8_t | I2C_ADDR_OFFSET_PIN_SET [3] = { 23, 22, 21 } |
| GPIO pins used for I2C address selection DIP switches. More... | |
| PstTestPins | pstTestPins |
| Dynamically allocate array of player pointers. | |
Firmware for the LCC Fusion BSD (Block Short Detection) Card.
High-level overview and links to the main entry points (setup/loop) and helper functions used by the BSD firmware.
|
strong |
Sensor finite-state machine states.
| Enumerator | |
|---|---|
| OK | Normal operation, rail connected. |
| TRIPPED | Fault detected; rail disconnected; subject to retry. |
| LOCKOUT | Persistent fault; remains disconnected until reset. |
Definition at line 57 of file BsdSensor.h.
| void getSensorRanges | ( | ) |
Parse up to NUM_BSD_SENSORS_PER_CARD "< low_mA high_mA ... >" pairs and update thresholds. Rules:
Definition at line 185 of file BSD_Card.ino.


| void loop | ( | ) |
Arduino loop: advances each sensor; all host-visible bits are derived on demand.
Main loop: poll for complete packets and dispatch commands.
SAMPLE_PERIOD_MS internally, so this loop may iterate faster without oversampling the ADC. Definition at line 355 of file BSD_Card.ino.

|
static |
I²C on-request: write a 2-byte frame [OCC_lo, SHORT_hi].
Definition at line 125 of file BSD_Card.ino.
| void setup | ( | ) |
Arduino setup: configures ADC, sensors, relays, and I²C target mode.
Initialize system: Serial, SPIFFS, players, and input interfaces.
Steps:
Definition at line 332 of file BSD_Card.ino.

| void setupHelpCallback | ( | ) |
Register help/usage text for this card (shown on user request).
Install the help‐text callback for the Sound Card commands.
Purely diagnostic; does not alter ranges or bitmap.
Definition at line 139 of file BSD_Card.ino.

| void setupTestCallback | ( | ) |
Install the test callback for the Card commands.
Install the test callback for the Audio Card commands.
Definition at line 152 of file BSD_Card.ino.

|
staticconstexpr |