1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +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) {
if (id > 0) {
if (id >= 0) {
int sigslot = 0;
int16_t sighandle = 0;
// 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
// but for a servo signal it will also have SERVO_SIGNAL_FLAG set.
VPIN sigid = sighandle & SIGNAL_ID_MASK;
if (sigid == (VPIN)id)
return sigslot; // found it
sigslot++; // keep looking
if (sigid == (VPIN)id) // cast to keep compiler happy but id is positive
return sigslot; // found it
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);
return -1;
return -1;
}
/* static */ void RMFT2::doSignal(int16_t id,char rag) {