Skip to content

Commit

Permalink
getSignalSlot minor typo (and indent/comments) fix
Browse files Browse the repository at this point in the history
  • Loading branch information
habazut committed May 9, 2024
1 parent a610e83 commit 86310ae
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions EXRAIL2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down

0 comments on commit 86310ae

Please sign in to comment.