mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 21:01:25 +01:00
JMRI_SENSOR command
JMRI_SENSOR command
This commit is contained in:
commit
15c2b5af04
@ -84,6 +84,7 @@
|
||||
#undef IFTTPOSITION
|
||||
#undef IFRE
|
||||
#undef INVERT_DIRECTION
|
||||
#undef JMRI_SENSOR
|
||||
#undef JOIN
|
||||
#undef KILLALL
|
||||
#undef LATCH
|
||||
@ -237,6 +238,7 @@
|
||||
#define IFTTPOSITION(turntable_id,position)
|
||||
#define IFRE(sensor_id,value)
|
||||
#define INVERT_DIRECTION
|
||||
#define JMRI_SENSOR(vpin,count...)
|
||||
#define JOIN
|
||||
#define KILLALL
|
||||
#define LATCH(sensor_id)
|
||||
|
@ -149,6 +149,8 @@ static_assert(!hasdup(compileTimeSequenceList[0],1),"Duplicate SEQUENCE/ROUTE/AU
|
||||
#define HAL(haltype,params...) haltype::create(params);
|
||||
#undef HAL_IGNORE_DEFAULTS
|
||||
#define HAL_IGNORE_DEFAULTS ignore_defaults=true;
|
||||
#undef JMRI_SENSOR
|
||||
#define JMRI_SENSOR(vpin,count...) Sensor::createMultiple(vpin,##count);
|
||||
bool exrailHalSetup() {
|
||||
bool ignore_defaults=false;
|
||||
#include "myAutomation.h"
|
||||
@ -487,6 +489,7 @@ int RMFT2::onLCCLookup[RMFT2::countLCCLookup];
|
||||
#endif
|
||||
#define IFRE(sensor_id,value) OPCODE_IFRE,V(sensor_id),OPCODE_PAD,V(value),
|
||||
#define INVERT_DIRECTION OPCODE_INVERT_DIRECTION,0,0,
|
||||
#define JMRI_SENSOR(vpin,count...)
|
||||
#define JOIN OPCODE_JOIN,0,0,
|
||||
#define KILLALL OPCODE_KILLALL,0,0,
|
||||
#define LATCH(sensor_id) OPCODE_LATCH,V(sensor_id),
|
||||
|
@ -1 +1 @@
|
||||
#define GITHUB_SHA "devel-stm32EC 202402041604Z"
|
||||
#define GITHUB_SHA "devel-stm32EC 202402072340Z"
|
||||
|
@ -230,6 +230,13 @@ Sensor *Sensor::create(int snum, VPIN pin, int pullUp){
|
||||
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
|
||||
// by means other than by polling an input.
|
||||
|
@ -76,6 +76,7 @@ public:
|
||||
static void store();
|
||||
#endif
|
||||
static Sensor *create(int id, VPIN vpin, int pullUp);
|
||||
static void createMultiple(VPIN firstPin, byte count=1);
|
||||
static Sensor* get(int id);
|
||||
static bool remove(int id);
|
||||
static void checkAll();
|
||||
|
@ -3,12 +3,14 @@
|
||||
|
||||
#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.3 - Fix Ethernet cable disconnected message, wait for DHCP
|
||||
// 5.3.2 - MDNS Generic library integration for Ethernet
|
||||
// 5.3.1 - Variable frequency for DC mode
|
||||
// 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)
|
||||
// - Added enhanced IO_I2CDFPLayer enum commands to EXRAIL2.h
|
||||
// - Added PLAYSOUND alias of ANOUT to EXRAILMacros.h
|
||||
|
Loading…
Reference in New Issue
Block a user