From e7fb3648b03263d044ea87cd954edc5d6cf478cf Mon Sep 17 00:00:00 2001 From: Asbelos Date: Fri, 29 Apr 2022 19:33:44 +0100 Subject: [PATCH 1/2] Allow turnout id 0 --- EXRAIL2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXRAIL2.cpp b/EXRAIL2.cpp index 599411e..60c66c6 100644 --- a/EXRAIL2.cpp +++ b/EXRAIL2.cpp @@ -450,7 +450,7 @@ RMFT2::RMFT2(int progCtr) { invert=false; timeoutFlag=false; stackDepth=0; - onTurnoutId=0; // Not handling an ONTHROW/ONCLOSE + onTurnoutId=-1; // Not handling an ONTHROW/ONCLOSE // chain into ring of RMFTs if (loopTask==NULL) { From f7d64d5449e5d9abd3d5b4810a145bf3455ad415 Mon Sep 17 00:00:00 2001 From: Asbelos Date: Fri, 29 Apr 2022 19:34:08 +0100 Subject: [PATCH 2/2] Position servo pin used as GPIO --- IO_PCA9685.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IO_PCA9685.cpp b/IO_PCA9685.cpp index 23b09df..036f634 100644 --- a/IO_PCA9685.cpp +++ b/IO_PCA9685.cpp @@ -155,7 +155,7 @@ void PCA9685::_writeAnalogue(VPIN vpin, int value, uint8_t profile, uint16_t dur // Servo pin not configured, so configure now using defaults s = _servoData[pin] = (struct ServoData *) calloc(sizeof(struct ServoData), 1); if (s == NULL) return; // Check for memory allocation failure - s->activePosition = 0; + s->activePosition = 4095; s->inactivePosition = 0; s->currentPosition = value; s->profile = Instant; // Use instant profile (but not this time)