mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
EXTAIL AFTER debounce time
This commit is contained in:
parent
60e564df51
commit
96c4757cc6
|
@ -628,14 +628,16 @@ void RMFT2::loop2() {
|
||||||
skipIf=blinkState!=at_timeout;
|
skipIf=blinkState!=at_timeout;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPCODE_AFTER: // waits for sensor to hit and then remain off for 0.5 seconds. (must come after an AT operation)
|
case OPCODE_AFTER: // waits for sensor to hit and then remain off for x mS.
|
||||||
|
// Note, this must come after an AT operation, which is
|
||||||
|
// automatically inserted by the AFTER macro.
|
||||||
if (readSensor(operand)) {
|
if (readSensor(operand)) {
|
||||||
// reset timer to half a second and keep waiting
|
// reset timer and keep waiting
|
||||||
waitAfter=millis();
|
waitAfter=millis();
|
||||||
delayMe(50);
|
delayMe(50);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (millis()-waitAfter < 500 ) return;
|
if (millis()-waitAfter < getOperand(1) ) return;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPCODE_AFTEROVERLOAD: // waits for the power to be turned back on - either by power routine or button
|
case OPCODE_AFTEROVERLOAD: // waits for the power to be turned back on - either by power routine or button
|
||||||
|
|
|
@ -195,7 +195,7 @@
|
||||||
#ifndef RMFT2_UNDEF_ONLY
|
#ifndef RMFT2_UNDEF_ONLY
|
||||||
#define ACTIVATE(addr,subaddr)
|
#define ACTIVATE(addr,subaddr)
|
||||||
#define ACTIVATEL(addr)
|
#define ACTIVATEL(addr)
|
||||||
#define AFTER(sensor_id)
|
#define AFTER(sensor_id,timer...)
|
||||||
#define AFTEROVERLOAD(track_id)
|
#define AFTEROVERLOAD(track_id)
|
||||||
#define ALIAS(name,value...)
|
#define ALIAS(name,value...)
|
||||||
#define AMBER(signal_id)
|
#define AMBER(signal_id)
|
||||||
|
|
|
@ -463,7 +463,7 @@ int RMFT2::onLCCLookup[RMFT2::countLCCLookup];
|
||||||
|
|
||||||
#define ACTIVATE(addr,subaddr) OPCODE_DCCACTIVATE,V(addr<<3 | subaddr<<1 | 1),
|
#define ACTIVATE(addr,subaddr) OPCODE_DCCACTIVATE,V(addr<<3 | subaddr<<1 | 1),
|
||||||
#define ACTIVATEL(addr) OPCODE_DCCACTIVATE,V((addr+3)<<1 | 1),
|
#define ACTIVATEL(addr) OPCODE_DCCACTIVATE,V((addr+3)<<1 | 1),
|
||||||
#define AFTER(sensor_id) OPCODE_AT,V(sensor_id),OPCODE_AFTER,V(sensor_id),
|
#define AFTER(sensor_id,timer...) OPCODE_AT,V(sensor_id),OPCODE_AFTER,V(sensor_id),OPCODE_PAD,V(#timer[0]?timer+0:500),
|
||||||
#define AFTEROVERLOAD(track_id) OPCODE_AFTEROVERLOAD,V(TRACK_NUMBER_##track_id),
|
#define AFTEROVERLOAD(track_id) OPCODE_AFTEROVERLOAD,V(TRACK_NUMBER_##track_id),
|
||||||
#define ALIAS(name,value...)
|
#define ALIAS(name,value...)
|
||||||
#define AMBER(signal_id) OPCODE_AMBER,V(signal_id),
|
#define AMBER(signal_id) OPCODE_AMBER,V(signal_id),
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
|
|
||||||
#include "StringFormatter.h"
|
#include "StringFormatter.h"
|
||||||
|
|
||||||
#define VERSION "5.2.66"
|
#define VERSION "5.2.67"
|
||||||
|
// 5.2.67 - EXRAIL AFTER optional debounce time variable (default 500mS)
|
||||||
|
// - AFTER(42) == AFTER(42,500) sets time sensor must
|
||||||
|
// - be continuously off.
|
||||||
// 5.2.66 - <F cab DCFREQ 0..3>
|
// 5.2.66 - <F cab DCFREQ 0..3>
|
||||||
// - EXRAIL SETFREQ drop loco param (breaking since 5.2.28)
|
// - EXRAIL SETFREQ drop loco param (breaking since 5.2.28)
|
||||||
// 5.2.65 - Speedup Exrail SETFREQ
|
// 5.2.65 - Speedup Exrail SETFREQ
|
||||||
|
|
Loading…
Reference in New Issue
Block a user