From c6866aba861348487657f4f01f58e2b69f3de729 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Tue, 30 Aug 2022 22:45:10 +0200 Subject: [PATCH] Fundumoto board does not have brake --- GITHUB_SHA.h | 2 +- MotorDriver.cpp | 6 +++--- MotorDrivers.h | 2 +- version.h | 4 +++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/GITHUB_SHA.h b/GITHUB_SHA.h index 777795e..85abd54 100644 --- a/GITHUB_SHA.h +++ b/GITHUB_SHA.h @@ -1 +1 @@ -#define GITHUB_SHA "PORTX-HAL-20220828" +#define GITHUB_SHA "PORTX-HAL-20220830" diff --git a/MotorDriver.cpp b/MotorDriver.cpp index f421b3b..7088111 100644 --- a/MotorDriver.cpp +++ b/MotorDriver.cpp @@ -241,11 +241,11 @@ void MotorDriver::setDCSignal(byte speedcode) { DCCEXanalogWriteFrequency(brakePin, 100); // set DC PWM frequency to 100Hz XXX May move to setup #endif #if defined(ARDUINO_AVR_UNO) - TCCR2B = TCCR2B & B11111000 | B00000110; // set divisor on timer 2 to result in (approx) 122.55Hz + TCCR2B = (TCCR2B & B11111000) | B00000110; // set divisor on timer 2 to result in (approx) 122.55Hz #endif #if defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560) - TCCR2B = TCCR2B & B11111000 | B00000110; // set divisor on timer 2 to result in (approx) 122.55Hz - TCCR4B = TCCR4B & B11111000 | B00000100; // same for timer 4 but maxcount and thus divisor differs + TCCR2B = (TCCR2B & B11111000) | B00000110; // set divisor on timer 2 to result in (approx) 122.55Hz + TCCR4B = (TCCR4B & B11111000) | B00000100; // same for timer 4 but maxcount and thus divisor differs #endif // spedcoode is a dcc speed & direction byte tSpeed=speedcode & 0x7F; // DCC Speed with 0,1 stop and speed steps 2 to 127 diff --git a/MotorDrivers.h b/MotorDrivers.h index 5e42450..3d3d297 100644 --- a/MotorDrivers.h +++ b/MotorDrivers.h @@ -127,7 +127,7 @@ // FunduMoto Motor Shield #define FUNDUMOTO_SHIELD F("FUNDUMOTO_SHIELD"), \ - new MotorDriver(10, 12, UNUSED_PIN, 9, A0, 2.99, 1500, UNUSED_PIN), \ + new MotorDriver(10, 12, UNUSED_PIN, UNUSED_PIN, A0, 2.99, 1500, UNUSED_PIN), \ new MotorDriver(11, 13, UNUSED_PIN, UNUSED_PIN, A1, 2.99, 1500, UNUSED_PIN) // IBT_2 Motor Board for Main and Arduino Motor Shield for Prog diff --git a/version.h b/version.h index ac1f5ea..b4e4690 100644 --- a/version.h +++ b/version.h @@ -4,7 +4,9 @@ #include "StringFormatter.h" -#define VERSION "4.2.3 rc1" +#define VERSION "4.2.4 rc1" +// 4.2.4 ESP32 experimental BT support +// More DC configurations possible and lower frequency // 4.2.3 Bugfix direction when togging between MAIN and DC // Bugfix return fail when F/f argument out of range // More error checking for out of bounds motor driver current trip limit