Initialisation depot

This commit is contained in:
Serge NOEL
2026-02-10 12:12:11 +01:00
commit c3176e8d79
818 changed files with 52573 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
/**
* @file RelayController.cpp
* @brief Implementation of relay controller for track configuration switching
*
* @author Locomotive Test Bench Project
* @date 2025
*/
#include "RelayController.h"
RelayController::RelayController() : is3Rail(false) {
}
void RelayController::begin() {
pinMode(RELAY_PIN, OUTPUT);
digitalWrite(RELAY_PIN, LOW); // Start in 2-rail mode
is3Rail = false;
Serial.println("Relay Controller initialized - 2-rail mode");
}
void RelayController::setRailMode(bool mode3Rail) {
is3Rail = mode3Rail;
digitalWrite(RELAY_PIN, is3Rail ? HIGH : LOW);
Serial.print("Rail mode changed to: ");
Serial.println(is3Rail ? "3-rail" : "2-rail");
}