1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-24 05:11:24 +01:00

getSignalSlot minor typo (and indent/comments) fix

This commit is contained in:
Harald Barth 2024-05-09 15:18:00 +02:00
parent a610e83f6e
commit 86310aea4f

View File

@ -1145,7 +1145,7 @@ void RMFT2::kill(const FSH * reason, int operand) {
int16_t RMFT2::getSignalSlot(int16_t id) { int16_t RMFT2::getSignalSlot(int16_t id) {
if (id > 0) { if (id >= 0) {
int sigslot = 0; int sigslot = 0;
int16_t sighandle = 0; int16_t sighandle = 0;
// Trundle down the signal list until we reach the end // Trundle down the signal list until we reach the end
@ -1155,14 +1155,14 @@ int16_t RMFT2::getSignalSlot(int16_t id) {
// for a LED signal it will be same as redpin // for a LED signal it will be same as redpin
// but for a servo signal it will also have SERVO_SIGNAL_FLAG set. // but for a servo signal it will also have SERVO_SIGNAL_FLAG set.
VPIN sigid = sighandle & SIGNAL_ID_MASK; VPIN sigid = sighandle & SIGNAL_ID_MASK;
if (sigid == (VPIN)id) if (sigid == (VPIN)id) // cast to keep compiler happy but id is positive
return sigslot; // found it return sigslot; // found it
sigslot++; // keep looking sigslot++; // keep looking
}; };
} }
// We did not find the signal // If we got here, we did not find the signal
DIAG(F("EXRAIL Signal %d not defined"), id); DIAG(F("EXRAIL Signal %d not defined"), id);
return -1; return -1;
} }
/* static */ void RMFT2::doSignal(int16_t id,char rag) { /* static */ void RMFT2::doSignal(int16_t id,char rag) {