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.
8786285624
...
1a3d295564
|
@ -1 +1 @@
|
||||||
#define GITHUB_SHA "devel-202305202114Z"
|
#define GITHUB_SHA "devel-202305201256Z"
|
||||||
|
|
|
@ -214,12 +214,14 @@ int MotorDriver::getCurrentRaw(bool fromISR) {
|
||||||
// if (fromISR == false) DIAG(F("%c: %d"), trackLetter, current);
|
// if (fromISR == false) DIAG(F("%c: %d"), trackLetter, current);
|
||||||
current = current-senseOffset; // adjust with offset
|
current = current-senseOffset; // adjust with offset
|
||||||
if (current<0) current=0-current;
|
if (current<0) current=0-current;
|
||||||
// current >= 0 here, we use negative current as fault pin flag
|
if ((faultPin != UNUSED_PIN) && powerMode==POWERMODE::ON) {
|
||||||
if ((faultPin != UNUSED_PIN) && powerPin) {
|
if (invertFault && isLOW(fastFaultPin))
|
||||||
if (invertFault ? isHIGH(fastFaultPin) : isLOW(fastFaultPin))
|
return (current == 0 ? -1 : -current);
|
||||||
|
if (!invertFault && !isLOW(fastFaultPin))
|
||||||
return (current == 0 ? -1 : -current);
|
return (current == 0 ? -1 : -current);
|
||||||
}
|
}
|
||||||
return current;
|
return current;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANALOG_READ_INTERRUPT
|
#ifdef ANALOG_READ_INTERRUPT
|
||||||
|
|
|
@ -73,8 +73,8 @@
|
||||||
|
|
||||||
// EX 8874 based shield connected to a 3V3 system with 12-bit (4096) ADC
|
// EX 8874 based shield connected to a 3V3 system with 12-bit (4096) ADC
|
||||||
#define EX8874_SHIELD F("EX8874"), \
|
#define EX8874_SHIELD F("EX8874"), \
|
||||||
new MotorDriver( 3, 12, UNUSED_PIN, 9, A0, 1.27, 5000, A4), \
|
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(11, 13, UNUSED_PIN, 8, A1, 1.27, 5000, -A5)
|
||||||
|
|
||||||
|
|
||||||
#elif defined(ARDUINO_ARCH_ESP32)
|
#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
|
// 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
|
// 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.27, 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.27, 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.
|
||||||
|
@ -104,8 +104,8 @@
|
||||||
|
|
||||||
// EX 8874 based shield connected to a 5V system (like Arduino) and 10bit (1024) ADC
|
// EX 8874 based shield connected to a 5V system (like Arduino) and 10bit (1024) ADC
|
||||||
#define EX8874_SHIELD F("EX8874"), \
|
#define EX8874_SHIELD F("EX8874"), \
|
||||||
new MotorDriver( 3, 12, UNUSED_PIN, 9, A0, 5.08, 5000, A4), \
|
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(11, 13, UNUSED_PIN, 8, A1, 5.08, 5000, -A5)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -58,20 +58,6 @@ Stream * WifiInterface::wifiStream;
|
||||||
#define NUM_SERIAL 1
|
#define NUM_SERIAL 1
|
||||||
#endif
|
#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,
|
bool WifiInterface::setup(long serial_link_speed,
|
||||||
const FSH *wifiESSID,
|
const FSH *wifiESSID,
|
||||||
const FSH *wifiPassword,
|
const FSH *wifiPassword,
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
#include "StringFormatter.h"
|
#include "StringFormatter.h"
|
||||||
|
|
||||||
|
|
||||||
#define VERSION "4.2.53"
|
#define VERSION "4.2.52"
|
||||||
// 4.2.53 - Fix: Fault pin handling made more straight forward
|
|
||||||
// 4.2.52 - Experimental support for sabertooth motor controller on ESP32
|
// 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.51 - Add DISABLE_PROG to disable programming to save RAM/Flash
|
||||||
// 4.2.50 - Fixes: estop all, turnout eeprom, cab ID check
|
// 4.2.50 - Fixes: estop all, turnout eeprom, cab ID check
|
||||||
|
|
Loading…
Reference in New Issue
Block a user