1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

Fundumoto board does not have brake

This commit is contained in:
Harald Barth 2022-08-30 22:45:10 +02:00
parent a91152be95
commit c6866aba86
4 changed files with 8 additions and 6 deletions

View File

@ -1 +1 @@
#define GITHUB_SHA "PORTX-HAL-20220828"
#define GITHUB_SHA "PORTX-HAL-20220830"

View File

@ -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

View File

@ -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

View File

@ -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