From c2eb5f23b4e0f888097cc1d73f1acb53540460e6 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Mon, 17 Jul 2023 09:42:39 +0200 Subject: [PATCH] restrict to relevant TRACK_MODE(s) --- GITHUB_SHA.h | 2 +- MotorDriver.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/GITHUB_SHA.h b/GITHUB_SHA.h index bdcfc16..1bec170 100644 --- a/GITHUB_SHA.h +++ b/GITHUB_SHA.h @@ -1 +1 @@ -#define GITHUB_SHA "devel-202307170030Z" +#define GITHUB_SHA "devel-202307170741Z" diff --git a/MotorDriver.cpp b/MotorDriver.cpp index ee154f0..160d8ad 100644 --- a/MotorDriver.cpp +++ b/MotorDriver.cpp @@ -350,6 +350,8 @@ void MotorDriver::setDCSignal(byte speedcode) { void MotorDriver::throttleInrush(bool on) { if (brakePin == UNUSED_PIN) return; + if ( !(trackMode & (TRACK_MODE_MAIN | TRACK_MODE_PROG | TRACK_MODE_EXT))) + return; byte duty = on ? 208 : 0; if (invertBrake) duty = 255-duty;