diff --git a/GITHUB_SHA.h b/GITHUB_SHA.h index 75a9be6..54a7905 100644 --- a/GITHUB_SHA.h +++ b/GITHUB_SHA.h @@ -1 +1 @@ -#define GITHUB_SHA "devel-202302281422Z" +#define GITHUB_SHA "devel-202303071416Z" diff --git a/MotorDriver.cpp b/MotorDriver.cpp index a6a1766..0236215 100644 --- a/MotorDriver.cpp +++ b/MotorDriver.cpp @@ -75,6 +75,23 @@ MotorDriver::MotorDriver(int16_t power_pin, byte signal_pin, byte signal_pin2, i dualSignal=true; getFastPin(F("SIG2"),signalPin2,fastSignalPin2); pinMode(signalPin2, OUTPUT); + + fastSignalPin2.shadowinout = NULL; + if (HAVE_PORTA(fastSignalPin2.inout == &PORTA)) { + DIAG(F("Found PORTA pin %d"),signalPin2); + fastSignalPin2.shadowinout = fastSignalPin2.inout; + fastSignalPin2.inout = &shadowPORTA; + } + if (HAVE_PORTB(fastSignalPin2.inout == &PORTB)) { + DIAG(F("Found PORTB pin %d"),signalPin2); + fastSignalPin2.shadowinout = fastSignalPin2.inout; + fastSignalPin2.inout = &shadowPORTB; + } + if (HAVE_PORTC(fastSignalPin2.inout == &PORTC)) { + DIAG(F("Found PORTC pin %d"),signalPin2); + fastSignalPin2.shadowinout = fastSignalPin2.inout; + fastSignalPin2.inout = &shadowPORTC; + } } else dualSignal=false; diff --git a/version.h b/version.h index 789ef2c..a4520fb 100644 --- a/version.h +++ b/version.h @@ -4,7 +4,8 @@ #include "StringFormatter.h" -#define VERSION "4.2.22" +#define VERSION "4.2.23" +// 4.2.23 - Bugfix signalpin2 was not set up in shadow port // 4.2.22 - Implement broadcast of Track Manager changes // 4.2.21 - Implement non-blocking I2C for EX-IOExpander device driver // 4.2.20 - & commands for multi-track gauges