mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-25 09:06:13 +01:00
Compare commits
No commits in common. "f4e3ca7c8163eb4a161a628d69fac50172d2f0c3" and "6d802f3a736cec3efc2cc75d39a5f05ba5ae7521" have entirely different histories.
f4e3ca7c81
...
6d802f3a73
|
@ -286,8 +286,6 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
|
||||||
|
|
||||||
if (direction < 0 || direction > 1)
|
if (direction < 0 || direction > 1)
|
||||||
break; // invalid direction code
|
break; // invalid direction code
|
||||||
if (cab > 10239 || cab < 0)
|
|
||||||
break; // beyond DCC range
|
|
||||||
|
|
||||||
DCC::setThrottle(cab, tspeed, direction);
|
DCC::setThrottle(cab, tspeed, direction);
|
||||||
if (params == 4) // send obsolete format T response
|
if (params == 4) // send obsolete format T response
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
#define GITHUB_SHA "devel-202305072222Z"
|
#define GITHUB_SHA "devel-202305051413Z"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* © 2022-2023 Paul M. Antoine
|
* © 2022 Paul M. Antoine
|
||||||
* © 2021 Fred Decker
|
* © 2021 Fred Decker
|
||||||
* © 2020-2023 Harald Barth
|
* © 2020-2022 Harald Barth
|
||||||
* (c) 2020 Chris Harlow. All rights reserved.
|
* (c) 2020 Chris Harlow. All rights reserved.
|
||||||
* (c) 2021 Fred Decker. All rights reserved.
|
* (c) 2021 Fred Decker. All rights reserved.
|
||||||
* (c) 2020 Harald Barth. All rights reserved.
|
* (c) 2020 Harald Barth. All rights reserved.
|
||||||
|
@ -60,8 +60,7 @@
|
||||||
// Arduino STANDARD Motor Shield, used on different architectures:
|
// Arduino STANDARD Motor Shield, used on different architectures:
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_STM32)
|
#if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_STM32)
|
||||||
// Standard Motor Shield definition for 3v3 processors (other than the ESP32)
|
// Setup for SAMD21 Sparkfun DEV board using Arduino standard Motor Shield R3 (MUST be R3
|
||||||
// Setup for SAMD21 Sparkfun DEV board MUST use Arduino Motor Shield R3 (MUST be R3
|
|
||||||
// for 3v3 compatibility!!) senseFactor for 3.3v systems is 1.95 as calculated when using
|
// for 3v3 compatibility!!) senseFactor for 3.3v systems is 1.95 as calculated when using
|
||||||
// 10-bit A/D samples, and for 12-bit samples it's more like 0.488, but we probably need
|
// 10-bit A/D samples, and for 12-bit samples it's more like 0.488, but we probably need
|
||||||
// to tweak both these
|
// to tweak both these
|
||||||
|
@ -71,12 +70,6 @@
|
||||||
#define SAMD_STANDARD_MOTOR_SHIELD STANDARD_MOTOR_SHIELD
|
#define SAMD_STANDARD_MOTOR_SHIELD STANDARD_MOTOR_SHIELD
|
||||||
#define STM32_STANDARD_MOTOR_SHIELD STANDARD_MOTOR_SHIELD
|
#define STM32_STANDARD_MOTOR_SHIELD STANDARD_MOTOR_SHIELD
|
||||||
|
|
||||||
// EX 8874 based shield connected to a 3V3 system with 12-bit (4096) ADC
|
|
||||||
#define EX8874_SHIELD F("EX8874"), \
|
|
||||||
new MotorDriver( 3, 12, UNUSED_PIN, 9, A0, 1.27, 5000, -A4), \
|
|
||||||
new MotorDriver(11, 13, UNUSED_PIN, 8, A1, 1.27, 5000, -A5)
|
|
||||||
|
|
||||||
|
|
||||||
#elif defined(ARDUINO_ARCH_ESP32)
|
#elif defined(ARDUINO_ARCH_ESP32)
|
||||||
// STANDARD shield on an ESPDUINO-32 (ESP32 in Uno form factor). The shield must be eiter the
|
// STANDARD shield on an ESPDUINO-32 (ESP32 in Uno form factor). The shield must be eiter the
|
||||||
// 3.3V compatible R3 version or it has to be modified to not supply more than 3.3V to the
|
// 3.3V compatible R3 version or it has to be modified to not supply more than 3.3V to the
|
||||||
|
@ -87,11 +80,9 @@
|
||||||
new MotorDriver(25/* 3*/, 19/*12*/, UNUSED_PIN, 13/*9*/, 35/*A2*/, 0.70, 1500, UNUSED_PIN), \
|
new MotorDriver(25/* 3*/, 19/*12*/, UNUSED_PIN, 13/*9*/, 35/*A2*/, 0.70, 1500, UNUSED_PIN), \
|
||||||
new MotorDriver(23/*11*/, 18/*13*/, UNUSED_PIN, 12/*8*/, 34/*A3*/, 0.70, 1500, UNUSED_PIN)
|
new MotorDriver(23/*11*/, 18/*13*/, UNUSED_PIN, 12/*8*/, 34/*A3*/, 0.70, 1500, UNUSED_PIN)
|
||||||
|
|
||||||
// EX 8874 based shield connected to a 3.3V system (like ESP32) and 12bit (4096) ADC
|
|
||||||
// numbers are GPIO numbers. comments are UNO form factor shield pin numbers
|
|
||||||
#define EX8874_SHIELD F("EX8874"),\
|
#define EX8874_SHIELD F("EX8874"),\
|
||||||
new MotorDriver(25/* 3*/, 19/*12*/, UNUSED_PIN, 13/*9*/, 35/*A2*/, 1.27, 5000, -36 /*-A4*/), \
|
new MotorDriver(25/* 3*/, 19/*12*/, UNUSED_PIN, 13/*9*/, 35/*A2*/, 1.17, 5000, -36 /*-A4*/), \
|
||||||
new MotorDriver(23/*11*/, 18/*13*/, UNUSED_PIN, 12/*8*/, 34/*A3*/, 1.27, 5000, -39 /*-A5*/)
|
new MotorDriver(23/*11*/, 18/*13*/, UNUSED_PIN, 12/*8*/, 34/*A3*/, 1.17, 5000, -39 /*-A5*/)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// STANDARD shield on any Arduino Uno or Mega compatible with the original specification.
|
// STANDARD shield on any Arduino Uno or Mega compatible with the original specification.
|
||||||
|
@ -101,12 +92,6 @@
|
||||||
#define BRAKE_PWM_SWAPPED_MOTOR_SHIELD F("BPS_MOTOR_SHIELD"), \
|
#define BRAKE_PWM_SWAPPED_MOTOR_SHIELD F("BPS_MOTOR_SHIELD"), \
|
||||||
new MotorDriver(-9 , 12, UNUSED_PIN, -3, A0, 2.99, 1500, UNUSED_PIN), \
|
new MotorDriver(-9 , 12, UNUSED_PIN, -3, A0, 2.99, 1500, UNUSED_PIN), \
|
||||||
new MotorDriver(-8 , 13, UNUSED_PIN,-11, A1, 2.99, 1500, UNUSED_PIN)
|
new MotorDriver(-8 , 13, UNUSED_PIN,-11, A1, 2.99, 1500, UNUSED_PIN)
|
||||||
|
|
||||||
// EX 8874 based shield connected to a 5V system (like Arduino) and 10bit (1024) ADC
|
|
||||||
#define EX8874_SHIELD F("EX8874"), \
|
|
||||||
new MotorDriver( 3, 12, UNUSED_PIN, 9, A0, 5.08, 5000, -A4), \
|
|
||||||
new MotorDriver(11, 13, UNUSED_PIN, 8, A1, 5.08, 5000, -A5)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Pololu Motor Shield
|
// Pololu Motor Shield
|
||||||
|
@ -135,6 +120,10 @@
|
||||||
new MotorDriver(2, 7, UNUSED_PIN, -9, A0, 10, 2500, 6), \
|
new MotorDriver(2, 7, UNUSED_PIN, -9, A0, 10, 2500, 6), \
|
||||||
new MotorDriver(4, 8, UNUSED_PIN, -10, A1, 10, 2500, 12)
|
new MotorDriver(4, 8, UNUSED_PIN, -10, A1, 10, 2500, 12)
|
||||||
|
|
||||||
|
#define EX8874_SHIELD F("EX8874"), \
|
||||||
|
new MotorDriver( 3, 12, UNUSED_PIN, 9, A0, 4.86, 5000, -A4), \
|
||||||
|
new MotorDriver(11, 13, UNUSED_PIN, 8, A1, 4.86, 5000, -A5)
|
||||||
|
|
||||||
// Firebox Mk1
|
// Firebox Mk1
|
||||||
#define FIREBOX_MK1 F("FIREBOX_MK1"), \
|
#define FIREBOX_MK1 F("FIREBOX_MK1"), \
|
||||||
new MotorDriver(3, 6, 7, UNUSED_PIN, A5, 9.766, 5500, UNUSED_PIN), \
|
new MotorDriver(3, 6, 7, UNUSED_PIN, A5, 9.766, 5500, UNUSED_PIN), \
|
||||||
|
|
|
@ -250,7 +250,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tt = (Turnout *)new ServoTurnout(id, vpin, thrownPosition, closedPosition, profile, closed);
|
tt = (Turnout *)new ServoTurnout(id, vpin, thrownPosition, closedPosition, profile, closed);
|
||||||
DIAG(F("Turnout 0x%x size %d size %d"), tt, sizeof(Turnout),sizeof(struct TurnoutData));
|
|
||||||
IODevice::writeAnalogue(vpin, closed ? closedPosition : thrownPosition, PCA9685::Instant);
|
IODevice::writeAnalogue(vpin, closed ? closedPosition : thrownPosition, PCA9685::Instant);
|
||||||
return tt;
|
return tt;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -235,10 +235,6 @@ int WiThrottle::getLocoId(byte * cmd) {
|
||||||
void WiThrottle::multithrottle(RingStream * stream, byte * cmd){
|
void WiThrottle::multithrottle(RingStream * stream, byte * cmd){
|
||||||
char throttleChar=cmd[1];
|
char throttleChar=cmd[1];
|
||||||
int locoid=getLocoId(cmd+3); // -1 for *
|
int locoid=getLocoId(cmd+3); // -1 for *
|
||||||
if (locoid > 10239 || locoid < -1) {
|
|
||||||
StringFormatter::send(stream, F("No valid DCC loco %d\n"), locoid);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
byte * aval=cmd;
|
byte * aval=cmd;
|
||||||
while(*aval !=';' && *aval !='\0') aval++;
|
while(*aval !=';' && *aval !='\0') aval++;
|
||||||
if (*aval) aval+=2; // skip ;>
|
if (*aval) aval+=2; // skip ;>
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
#include "StringFormatter.h"
|
#include "StringFormatter.h"
|
||||||
|
|
||||||
|
|
||||||
#define VERSION "4.2.50"
|
#define VERSION "4.2.48"
|
||||||
// 4.2.50 - Fixes: estop all, turnout eeprom, cab ID check
|
|
||||||
// 4.2.49 - Exrail SPEED take notice of external direction change
|
// 4.2.49 - Exrail SPEED take notice of external direction change
|
||||||
// 4.2.48 - BROADCAST/WITHROTTLE Exrail macros
|
// 4.2.48 - BROADCAST/WITHROTTLE Exrail macros
|
||||||
// 4.2.47 - Correct response to <JA 0>
|
// 4.2.47 - Correct response to <JA 0>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user