1
0
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. "8786285624e21917c9b42f39ff0b119a34bd47e3" and "1a3d295564a97aa2bcadf20a2d9bc962f7cbf2e7" have entirely different histories.

5 changed files with 13 additions and 26 deletions

View File

@ -1 +1 @@
#define GITHUB_SHA "devel-202305202114Z"
#define GITHUB_SHA "devel-202305201256Z"

View File

@ -214,12 +214,14 @@ int MotorDriver::getCurrentRaw(bool fromISR) {
// if (fromISR == false) DIAG(F("%c: %d"), trackLetter, current);
current = current-senseOffset; // adjust with offset
if (current<0) current=0-current;
// current >= 0 here, we use negative current as fault pin flag
if ((faultPin != UNUSED_PIN) && powerPin) {
if (invertFault ? isHIGH(fastFaultPin) : isLOW(fastFaultPin))
if ((faultPin != UNUSED_PIN) && powerMode==POWERMODE::ON) {
if (invertFault && isLOW(fastFaultPin))
return (current == 0 ? -1 : -current);
if (!invertFault && !isLOW(fastFaultPin))
return (current == 0 ? -1 : -current);
}
return current;
}
#ifdef ANALOG_READ_INTERRUPT

View File

@ -73,8 +73,8 @@
// 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)
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)
@ -90,8 +90,8 @@
// 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"),\
new MotorDriver(25/* 3*/, 19/*12*/, UNUSED_PIN, 13/*9*/, 35/*A2*/, 1.27, 5000, 36 /*A4*/), \
new MotorDriver(23/*11*/, 18/*13*/, UNUSED_PIN, 12/*8*/, 34/*A3*/, 1.27, 5000, 39 /*A5*/)
new MotorDriver(25/* 3*/, 19/*12*/, UNUSED_PIN, 13/*9*/, 35/*A2*/, 1.27, 5000, -36 /*-A4*/), \
new MotorDriver(23/*11*/, 18/*13*/, UNUSED_PIN, 12/*8*/, 34/*A3*/, 1.27, 5000, -39 /*-A5*/)
#else
// STANDARD shield on any Arduino Uno or Mega compatible with the original specification.
@ -104,8 +104,8 @@
// 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)
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

View File

@ -58,20 +58,6 @@ Stream * WifiInterface::wifiStream;
#define NUM_SERIAL 1
#endif
// To be able to define these in platform specific
// DCCTimer<PLATFORM>.cpp files, we here make the
// assumption that these exist to link against.
// if enough serial interfaces exist.
#if NUM_SERIAL > 0
extern HardwareSerial Serial1;
#endif
#if NUM_SERIAL > 1
extern HardwareSerial Serial2;
#endif
#if NUM_SERIAL > 2
extern HardwareSerial Serial3;
#endif
bool WifiInterface::setup(long serial_link_speed,
const FSH *wifiESSID,
const FSH *wifiPassword,

View File

@ -4,8 +4,7 @@
#include "StringFormatter.h"
#define VERSION "4.2.53"
// 4.2.53 - Fix: Fault pin handling made more straight forward
#define VERSION "4.2.52"
// 4.2.52 - Experimental support for sabertooth motor controller on ESP32
// 4.2.51 - Add DISABLE_PROG to disable programming to save RAM/Flash
// 4.2.50 - Fixes: estop all, turnout eeprom, cab ID check