mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-22 23:56:13 +01:00
Merge branch 'devel' of https://github.com/DCC-EX/CommandStation-EX into devel
This commit is contained in:
commit
49c0a1a55a
|
@ -162,7 +162,7 @@ uint16_t ADCee::usedpins = 0;
|
||||||
int * ADCee::analogvals = NULL;
|
int * ADCee::analogvals = NULL;
|
||||||
|
|
||||||
int ADCee::init(uint8_t pin) {
|
int ADCee::init(uint8_t pin) {
|
||||||
uint id = pin - A0;
|
uint8_t id = pin - A0;
|
||||||
int value = 0;
|
int value = 0;
|
||||||
|
|
||||||
if (id > NUM_ADC_INPUTS)
|
if (id > NUM_ADC_INPUTS)
|
||||||
|
@ -210,7 +210,7 @@ int ADCee::read(uint8_t pin, bool fromISR) {
|
||||||
#pragma GCC push_options
|
#pragma GCC push_options
|
||||||
#pragma GCC optimize ("-O3")
|
#pragma GCC optimize ("-O3")
|
||||||
void ADCee::scan() {
|
void ADCee::scan() {
|
||||||
static uint id = 0; // id and mask are the same thing but it is faster to
|
static uint8_t id = 0; // id and mask are the same thing but it is faster to
|
||||||
static uint16_t mask = 1; // increment and shift instead to calculate mask from id
|
static uint16_t mask = 1; // increment and shift instead to calculate mask from id
|
||||||
static bool waiting = false;
|
static bool waiting = false;
|
||||||
|
|
||||||
|
|
|
@ -237,6 +237,7 @@ int16_t ADCee::ADCmax() {
|
||||||
}
|
}
|
||||||
|
|
||||||
int ADCee::init(uint8_t pin) {
|
int ADCee::init(uint8_t pin) {
|
||||||
|
|
||||||
int value = 0;
|
int value = 0;
|
||||||
PinName stmpin = analogInputToPinName(pin);
|
PinName stmpin = analogInputToPinName(pin);
|
||||||
uint32_t stmgpio = stmpin / 16; // 16-bits per GPIO port group on STM32
|
uint32_t stmgpio = stmpin / 16; // 16-bits per GPIO port group on STM32
|
||||||
|
|
|
@ -134,6 +134,7 @@
|
||||||
#undef STOP
|
#undef STOP
|
||||||
#undef THROW
|
#undef THROW
|
||||||
#undef TURNOUT
|
#undef TURNOUT
|
||||||
|
#undef TURNOUTL
|
||||||
#undef UNJOIN
|
#undef UNJOIN
|
||||||
#undef UNLATCH
|
#undef UNLATCH
|
||||||
#undef VIRTUAL_SIGNAL
|
#undef VIRTUAL_SIGNAL
|
||||||
|
@ -254,6 +255,7 @@
|
||||||
#define STOP
|
#define STOP
|
||||||
#define THROW(id)
|
#define THROW(id)
|
||||||
#define TURNOUT(id,addr,subaddr,description...)
|
#define TURNOUT(id,addr,subaddr,description...)
|
||||||
|
#define TURNOUTL(id,addr,description...)
|
||||||
#define UNJOIN
|
#define UNJOIN
|
||||||
#define UNLATCH(sensor_id)
|
#define UNLATCH(sensor_id)
|
||||||
#define VIRTUAL_SIGNAL(id)
|
#define VIRTUAL_SIGNAL(id)
|
||||||
|
|
|
@ -361,6 +361,7 @@ const HIGHFLASH int16_t RMFT2::SignalDefinitions[] = {
|
||||||
#define STOP OPCODE_SPEED,V(0),
|
#define STOP OPCODE_SPEED,V(0),
|
||||||
#define THROW(id) OPCODE_THROW,V(id),
|
#define THROW(id) OPCODE_THROW,V(id),
|
||||||
#define TURNOUT(id,addr,subaddr,description...) OPCODE_TURNOUT,V(id),OPCODE_PAD,V(addr),OPCODE_PAD,V(subaddr),
|
#define TURNOUT(id,addr,subaddr,description...) OPCODE_TURNOUT,V(id),OPCODE_PAD,V(addr),OPCODE_PAD,V(subaddr),
|
||||||
|
#define TURNOUTL(id,addr,description...) TURNOUT(id,(addr-1)/4+1,(addr-1)%4, description)
|
||||||
#define UNJOIN OPCODE_UNJOIN,0,0,
|
#define UNJOIN OPCODE_UNJOIN,0,0,
|
||||||
#define UNLATCH(sensor_id) OPCODE_UNLATCH,V(sensor_id),
|
#define UNLATCH(sensor_id) OPCODE_UNLATCH,V(sensor_id),
|
||||||
#define VIRTUAL_SIGNAL(id)
|
#define VIRTUAL_SIGNAL(id)
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
|
|
||||||
#define VERSION "4.2.41"
|
#define VERSION "4.2.41"
|
||||||
|
// 4.2.42 - Added EXRAIL TURNOUTL Macro definition
|
||||||
// 4.2.41 - Move HAl startup to ASAP in setup()
|
// 4.2.41 - Move HAl startup to ASAP in setup()
|
||||||
// - Fix DNOU8 output pin setup to all LOW
|
// - Fix DNOU8 output pin setup to all LOW
|
||||||
// 4.2.40 - Automatically detect conflicting default I2C devices and disable
|
// 4.2.40 - Automatically detect conflicting default I2C devices and disable
|
||||||
|
@ -72,6 +73,10 @@
|
||||||
// 4.2.11 Exrail IFLOCO feature added
|
// 4.2.11 Exrail IFLOCO feature added
|
||||||
// 4.2.10 SIGNAL/SIGNALH bug fix as they were inverted
|
// 4.2.10 SIGNAL/SIGNALH bug fix as they were inverted
|
||||||
// IO_EXIOExpander.h input speed optimisation
|
// IO_EXIOExpander.h input speed optimisation
|
||||||
|
// ONCLOCK and ONCLOCKTIME command added to EXRAIL for EX-FastCLock
|
||||||
|
// <JC> Serial command added for EX-FastClock
|
||||||
|
// <jC> Broadcast added for EX-FastClock
|
||||||
|
// IO_EXFastClock.h added for I2C FastClock connection
|
||||||
// 4.2.9 duinoNodes support
|
// 4.2.9 duinoNodes support
|
||||||
// 4.2.8 HIGHMEM (EXRAIL support beyond 64kb)
|
// 4.2.8 HIGHMEM (EXRAIL support beyond 64kb)
|
||||||
// Withrottle connect/disconnect improvements
|
// Withrottle connect/disconnect improvements
|
||||||
|
|
Loading…
Reference in New Issue
Block a user