1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-24 00:26:13 +01:00

Compare commits

..

4 Commits

Author SHA1 Message Date
Ash-4
15c2b5af04
JMRI_SENSOR command
JMRI_SENSOR command
2024-02-07 17:51:10 -06:00
Ash-4
17ffe46179
Merge branch 'devel-stm32EC' into ash-temp-0207 2024-02-07 17:46:21 -06:00
Asbelos
8293749ac7 JMRI_SENSOR exrail 2024-02-07 22:11:27 +00:00
Harald Barth
4931c5ed75 tag 2024-02-05 09:28:07 +01:00
6 changed files with 17 additions and 2 deletions

View File

@ -84,6 +84,7 @@
#undef IFTTPOSITION #undef IFTTPOSITION
#undef IFRE #undef IFRE
#undef INVERT_DIRECTION #undef INVERT_DIRECTION
#undef JMRI_SENSOR
#undef JOIN #undef JOIN
#undef KILLALL #undef KILLALL
#undef LATCH #undef LATCH
@ -237,6 +238,7 @@
#define IFTTPOSITION(turntable_id,position) #define IFTTPOSITION(turntable_id,position)
#define IFRE(sensor_id,value) #define IFRE(sensor_id,value)
#define INVERT_DIRECTION #define INVERT_DIRECTION
#define JMRI_SENSOR(vpin,count...)
#define JOIN #define JOIN
#define KILLALL #define KILLALL
#define LATCH(sensor_id) #define LATCH(sensor_id)

View File

@ -149,6 +149,8 @@ static_assert(!hasdup(compileTimeSequenceList[0],1),"Duplicate SEQUENCE/ROUTE/AU
#define HAL(haltype,params...) haltype::create(params); #define HAL(haltype,params...) haltype::create(params);
#undef HAL_IGNORE_DEFAULTS #undef HAL_IGNORE_DEFAULTS
#define HAL_IGNORE_DEFAULTS ignore_defaults=true; #define HAL_IGNORE_DEFAULTS ignore_defaults=true;
#undef JMRI_SENSOR
#define JMRI_SENSOR(vpin,count...) Sensor::createMultiple(vpin,##count);
bool exrailHalSetup() { bool exrailHalSetup() {
bool ignore_defaults=false; bool ignore_defaults=false;
#include "myAutomation.h" #include "myAutomation.h"
@ -487,6 +489,7 @@ int RMFT2::onLCCLookup[RMFT2::countLCCLookup];
#endif #endif
#define IFRE(sensor_id,value) OPCODE_IFRE,V(sensor_id),OPCODE_PAD,V(value), #define IFRE(sensor_id,value) OPCODE_IFRE,V(sensor_id),OPCODE_PAD,V(value),
#define INVERT_DIRECTION OPCODE_INVERT_DIRECTION,0,0, #define INVERT_DIRECTION OPCODE_INVERT_DIRECTION,0,0,
#define JMRI_SENSOR(vpin,count...)
#define JOIN OPCODE_JOIN,0,0, #define JOIN OPCODE_JOIN,0,0,
#define KILLALL OPCODE_KILLALL,0,0, #define KILLALL OPCODE_KILLALL,0,0,
#define LATCH(sensor_id) OPCODE_LATCH,V(sensor_id), #define LATCH(sensor_id) OPCODE_LATCH,V(sensor_id),

View File

@ -1 +1 @@
#define GITHUB_SHA "devel-stm32EC 202402041604Z" #define GITHUB_SHA "devel-stm32EC 202402072340Z"

View File

@ -230,6 +230,13 @@ Sensor *Sensor::create(int snum, VPIN pin, int pullUp){
return tt; return tt;
} }
// Creet multiple eponymous sensors based on vpin alone.
void Sensor::createMultiple(VPIN firstPin, byte count) {
for (byte i=0;i<count;i++) {
create(firstPin+i,firstPin+i,1);
}
}
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Object method to directly change the input state, for sensors such as LCN which are updated // Object method to directly change the input state, for sensors such as LCN which are updated
// by means other than by polling an input. // by means other than by polling an input.

View File

@ -76,6 +76,7 @@ public:
static void store(); static void store();
#endif #endif
static Sensor *create(int id, VPIN vpin, int pullUp); static Sensor *create(int id, VPIN vpin, int pullUp);
static void createMultiple(VPIN firstPin, byte count=1);
static Sensor* get(int id); static Sensor* get(int id);
static bool remove(int id); static bool remove(int id);
static void checkAll(); static void checkAll();

View File

@ -3,12 +3,14 @@
#include "StringFormatter.h" #include "StringFormatter.h"
#define VERSION "5.3.4" #define VERSION "5.3.5"
// 5.3.5 - Exrail JMRI_SENSORS(vpin [,count]) creates <S> types.
// 5.3.4 - Bugfix: WiThrottle sendIntro after initial N message as well // 5.3.4 - Bugfix: WiThrottle sendIntro after initial N message as well
// 5.3.3 - Fix Ethernet cable disconnected message, wait for DHCP // 5.3.3 - Fix Ethernet cable disconnected message, wait for DHCP
// 5.3.2 - MDNS Generic library integration for Ethernet // 5.3.2 - MDNS Generic library integration for Ethernet
// 5.3.1 - Variable frequency for DC mode // 5.3.1 - Variable frequency for DC mode
// 5.2.40 - Bugfix: WiThrottle sendIntro after initial N message as well // 5.2.40 - Bugfix: WiThrottle sendIntro after initial N message as well
// 5.2.31 - included in stm32EC as 5.3.5
// 5.2.29 - Added IO_I2CDFPlayer.h to support DFPLayer over I2C connected to NXP SC16IS750/SC16IS752 (currently only single UART for SC16IS752) // 5.2.29 - Added IO_I2CDFPlayer.h to support DFPLayer over I2C connected to NXP SC16IS750/SC16IS752 (currently only single UART for SC16IS752)
// - Added enhanced IO_I2CDFPLayer enum commands to EXRAIL2.h // - Added enhanced IO_I2CDFPLayer enum commands to EXRAIL2.h
// - Added PLAYSOUND alias of ANOUT to EXRAILMacros.h // - Added PLAYSOUND alias of ANOUT to EXRAILMacros.h