mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-03-15 10:33:07 +01:00
Compare commits
9 Commits
56a5c8b74e
...
9de6638085
Author | SHA1 | Date | |
---|---|---|---|
|
9de6638085 | ||
|
5f65fd5944 | ||
|
a26610bc7f | ||
|
264a53dacf | ||
|
0c96d4ffc2 | ||
|
843fa42692 | ||
|
b17dc5a0dd | ||
|
449a5f1670 | ||
|
06b8995861 |
@ -76,8 +76,13 @@ int DCCTimer::freeMemory() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef ARDUINO_ARCH_ESP32
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
|
|
||||||
|
#include "esp_idf_version.h"
|
||||||
|
#if ESP_IDF_VERSION_MAJOR > 4
|
||||||
|
#error "DCC-EX does not support compiling with IDF version 5.0 or later. Downgrade your ESP32 library to a version that contains IDE version 4. Arduino ESP32 library 3.0.0 is too new. Downgrade to one of 2.0.9 to 2.0.17"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "DIAG.h"
|
#include "DIAG.h"
|
||||||
#include <driver/adc.h>
|
#include <driver/adc.h>
|
||||||
#include <soc/sens_reg.h>
|
#include <soc/sens_reg.h>
|
||||||
|
@ -36,7 +36,20 @@
|
|||||||
#include "DIAG.h"
|
#include "DIAG.h"
|
||||||
#include <wiring_private.h>
|
#include <wiring_private.h>
|
||||||
|
|
||||||
#if defined(ARDUINO_NUCLEO_F401RE) || defined(ARDUINO_NUCLEO_F411RE)
|
#if defined(ARDUINO_NUCLEO_F401RE)
|
||||||
|
// Nucleo-64 boards don't have additional serial ports defined by default
|
||||||
|
// Serial1 is available on the F401RE, but not hugely convenient.
|
||||||
|
// Rx pin on PB7 is useful, but all the Tx pins map to Arduino digital pins, specifically:
|
||||||
|
// PA9 == D8
|
||||||
|
// PB6 == D10
|
||||||
|
// of which D8 is needed by the standard and EX8874 motor shields. D10 would be used if a second
|
||||||
|
// EX8874 is stacked. So only disable this if using a second motor shield.
|
||||||
|
HardwareSerial Serial1(PB7, PB6); // Rx=PB7, Tx=PB6 -- CN7 pin 17 and CN10 pin 17
|
||||||
|
// Serial2 is defined to use USART2 by default, but is in fact used as the diag console
|
||||||
|
// via the debugger on the Nucleo-64. It is therefore unavailable for other DCC-EX uses like WiFi, DFPlayer, etc.
|
||||||
|
// Let's define Serial6 as an additional serial port (the only other option for the F401RE)
|
||||||
|
HardwareSerial Serial6(PA12, PA11); // Rx=PA12, Tx=PA11 -- CN10 pins 12 and 14 - F401RE
|
||||||
|
#elif defined(ARDUINO_NUCLEO_F411RE)
|
||||||
// Nucleo-64 boards don't have additional serial ports defined by default
|
// Nucleo-64 boards don't have additional serial ports defined by default
|
||||||
HardwareSerial Serial1(PB7, PA15); // Rx=PB7, Tx=PA15 -- CN7 pins 17 and 21 - F411RE
|
HardwareSerial Serial1(PB7, PA15); // Rx=PB7, Tx=PA15 -- CN7 pins 17 and 21 - F411RE
|
||||||
// Serial2 is defined to use USART2 by default, but is in fact used as the diag console
|
// Serial2 is defined to use USART2 by default, but is in fact used as the diag console
|
||||||
@ -54,7 +67,7 @@ HardwareSerial Serial3(PC11, PC10); // Rx=PC11, Tx=PC10 -- USART3 - F446RE
|
|||||||
HardwareSerial Serial5(PD2, PC12); // Rx=PD2, Tx=PC12 -- UART5 - F446RE
|
HardwareSerial Serial5(PD2, PC12); // Rx=PD2, Tx=PC12 -- UART5 - F446RE
|
||||||
// On the F446RE, Serial4 and Serial6 also use pins we can't readily map while using the Arduino pins
|
// On the F446RE, Serial4 and Serial6 also use pins we can't readily map while using the Arduino pins
|
||||||
#elif defined(ARDUINO_NUCLEO_F412ZG) || defined(ARDUINO_NUCLEO_F413ZH) || defined(ARDUINO_NUCLEO_F446ZE) || \
|
#elif defined(ARDUINO_NUCLEO_F412ZG) || defined(ARDUINO_NUCLEO_F413ZH) || defined(ARDUINO_NUCLEO_F446ZE) || \
|
||||||
defined(ARDUINO_NUCLEO_F429ZI) || defined(ARDUINO_NUCLEO_F439ZI)
|
defined(ARDUINO_NUCLEO_F429ZI) || defined(ARDUINO_NUCLEO_F439ZI) || defined(ARDUINO_NUCLEO_F4X9ZI)
|
||||||
// Nucleo-144 boards don't have Serial1 defined by default
|
// Nucleo-144 boards don't have Serial1 defined by default
|
||||||
HardwareSerial Serial6(PG9, PG14); // Rx=PG9, Tx=PG14 -- USART6
|
HardwareSerial Serial6(PG9, PG14); // Rx=PG9, Tx=PG14 -- USART6
|
||||||
HardwareSerial Serial5(PD2, PC12); // Rx=PD2, Tx=PC12 -- UART5
|
HardwareSerial Serial5(PD2, PC12); // Rx=PD2, Tx=PC12 -- UART5
|
||||||
|
@ -228,7 +228,6 @@ LookList* RMFT2::LookListLoader(OPCODE op1, OPCODE op2, OPCODE op3) {
|
|||||||
case OPCODE_AT:
|
case OPCODE_AT:
|
||||||
case OPCODE_ATTIMEOUT2:
|
case OPCODE_ATTIMEOUT2:
|
||||||
case OPCODE_AFTER:
|
case OPCODE_AFTER:
|
||||||
case OPCODE_AFTEROVERLOAD:
|
|
||||||
case OPCODE_IF:
|
case OPCODE_IF:
|
||||||
case OPCODE_IFNOT: {
|
case OPCODE_IFNOT: {
|
||||||
int16_t pin = (int16_t)operand;
|
int16_t pin = (int16_t)operand;
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
// Pass 1 Implements aliases
|
// Pass 1 Implements aliases
|
||||||
#include "EXRAIL2MacroReset.h"
|
#include "EXRAIL2MacroReset.h"
|
||||||
#undef ALIAS
|
#undef ALIAS
|
||||||
#define ALIAS(name,value...) const int name= 1##value##0 ==10 ? -__COUNTER__ : value##0/10;
|
#define ALIAS(name,value...) const int name= #value[0] ? value+0: -__COUNTER__ ;
|
||||||
#include "myAutomation.h"
|
#include "myAutomation.h"
|
||||||
|
|
||||||
// Pass 1d Detect sequence duplicates.
|
// Pass 1d Detect sequence duplicates.
|
||||||
|
@ -1 +1 @@
|
|||||||
#define GITHUB_SHA "devel-202404091507Z"
|
#define GITHUB_SHA "devel-202406021945Z"
|
||||||
|
@ -638,6 +638,10 @@ void MotorDriver::checkPowerOverload(bool useProgLimit, byte trackno) {
|
|||||||
}
|
}
|
||||||
throttleInrush(false);
|
throttleInrush(false);
|
||||||
setPower(POWERMODE::ON);
|
setPower(POWERMODE::ON);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (goodtime > POWER_SAMPLE_ALERT_GOOD/2) {
|
||||||
|
throttleInrush(false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
* © 2022-2024 Paul M. Antoine
|
||||||
* © 2021 Fred Decker
|
* © 2021 Fred Decker
|
||||||
* © 2020-2022 Harald Barth
|
* © 2020-2022 Harald Barth
|
||||||
* © 2020-2022 Chris Harlow
|
* © 2020-2022 Chris Harlow
|
||||||
@ -70,7 +71,7 @@ Stream * WifiInterface::wifiStream;
|
|||||||
#define SERIAL3 Serial5
|
#define SERIAL3 Serial5
|
||||||
#elif defined(ARDUINO_NUCLEO_F413ZH) || defined(ARDUINO_NUCLEO_F429ZI) \
|
#elif defined(ARDUINO_NUCLEO_F413ZH) || defined(ARDUINO_NUCLEO_F429ZI) \
|
||||||
|| defined(ARDUINO_NUCLEO_F446ZE) || defined(ARDUINO_NUCLEO_F412ZG) \
|
|| defined(ARDUINO_NUCLEO_F446ZE) || defined(ARDUINO_NUCLEO_F412ZG) \
|
||||||
|| defined(ARDUINO_NUCLEO_F439ZI)
|
|| defined(ARDUINO_NUCLEO_F439ZI) || defined(ARDUINO_NUCLEO_F4X9ZI)
|
||||||
#define NUM_SERIAL 2
|
#define NUM_SERIAL 2
|
||||||
#define SERIAL1 Serial6
|
#define SERIAL1 Serial6
|
||||||
#else
|
#else
|
||||||
|
@ -164,7 +164,11 @@ monitor_echo = yes
|
|||||||
build_flags = -mcall-prologues
|
build_flags = -mcall-prologues
|
||||||
|
|
||||||
[env:ESP32]
|
[env:ESP32]
|
||||||
platform = espressif32
|
; Lock version to 6.7.0 as that is
|
||||||
|
; Arduino v2.0.16 (based on IDF v4.4.7)
|
||||||
|
; which is the latest version based
|
||||||
|
; on IDF v4. We can not use IDF v5.
|
||||||
|
platform = espressif32 @ 6.7.0
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
framework = arduino
|
framework = arduino
|
||||||
lib_deps = ${env.lib_deps}
|
lib_deps = ${env.lib_deps}
|
||||||
|
@ -3,7 +3,12 @@
|
|||||||
|
|
||||||
#include "StringFormatter.h"
|
#include "StringFormatter.h"
|
||||||
|
|
||||||
#define VERSION "5.2.57"
|
#define VERSION "5.2.60"
|
||||||
|
// 5.2.60 - Bugfix: Opcode AFTEROVERLOAD does not have an argument that is a pin and needs to be initialized
|
||||||
|
// - Remove inrush throttle after half good time so that we go to mode overload if problem persists
|
||||||
|
// 5.2.59 - STM32 bugfix correct Serial1 definition for Nucleo-F401RE
|
||||||
|
// - STM32 add support for ARDUINO_NUCLEO_F4X9ZI type to span F429/F439 in upcoming STM32duino release v2.8 as a result of our PR
|
||||||
|
// 5.2.58 - EXRAIL ALIAS allows named pins
|
||||||
// 5.2.57 - Bugfix autoreverse: Apply mode by binart bit match and not by equality
|
// 5.2.57 - Bugfix autoreverse: Apply mode by binart bit match and not by equality
|
||||||
// 5.2.56 - Bugfix and refactor for EXRAIL getSignalSlot
|
// 5.2.56 - Bugfix and refactor for EXRAIL getSignalSlot
|
||||||
// 5.2.55 - Move EXRAIL isSignal() to public to allow use in STEALTH call
|
// 5.2.55 - Move EXRAIL isSignal() to public to allow use in STEALTH call
|
||||||
|
Loading…
Reference in New Issue
Block a user