Skip to content

Commit

Permalink
Merge branch 'devel' of https://github.com/DCC-EX/CommandStation-EX i…
Browse files Browse the repository at this point in the history
…nto devel
  • Loading branch information
habazut committed Nov 9, 2024
2 parents 420d145 + 953b805 commit 6710c47
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
13 changes: 7 additions & 6 deletions EXRAIL2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,13 +677,14 @@ void RMFT2::loop2() {
break;

case OPCODE_SET:
killBlinkOnVpin(operand);
IODevice::write(operand,true);
break;

case OPCODE_RESET:
killBlinkOnVpin(operand);
IODevice::write(operand,false);
{
auto count=getOperand(1);
for (uint16_t i=0;i<count;i++) {
killBlinkOnVpin(operand+i);
IODevice::write(operand+i,opcode==OPCODE_SET);
}
}
break;

case OPCODE_BLINK:
Expand Down
4 changes: 2 additions & 2 deletions EXRAIL2MacroReset.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
#define READ_LOCO
#define RED(signal_id)
#define RESERVE(blockid)
#define RESET(pin)
#define RESET(pin,count...)
#define RESUME
#define RETURN
#define REV(speed)
Expand All @@ -335,7 +335,7 @@
#define SERVO2(id,position,duration)
#define SERVO_SIGNAL(vpin,redpos,amberpos,greenpos)
#define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle,profile,description...)
#define SET(pin)
#define SET(pin,count...)
#define SET_TRACK(track,mode)
#define SET_POWER(track,onoff)
#define SETLOCO(loco)
Expand Down
4 changes: 2 additions & 2 deletions EXRAILMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ int RMFT2::onLCCLookup[RMFT2::countLCCLookup];
#define READ_LOCO OPCODE_READ_LOCO1,0,0,OPCODE_READ_LOCO2,0,0,
#define RED(signal_id) OPCODE_RED,V(signal_id),
#define RESERVE(blockid) OPCODE_RESERVE,V(blockid),
#define RESET(pin) OPCODE_RESET,V(pin),
#define RESET(pin,count...) OPCODE_RESET,V(pin),OPCODE_PAD,V(#count[0] ? count+0: 1),
#define RESUME OPCODE_RESUME,0,0,
#define RETURN OPCODE_RETURN,0,0,
#define REV(speed) OPCODE_REV,V(speed),
Expand Down Expand Up @@ -635,7 +635,7 @@ int RMFT2::onLCCLookup[RMFT2::countLCCLookup];
#define SERVO2(id,position,ms) OPCODE_SERVO,V(id),OPCODE_PAD,V(position),OPCODE_PAD,V(PCA9685::Instant),OPCODE_PAD,V(ms/100L),
#define SERVO_SIGNAL(vpin,redpos,amberpos,greenpos)
#define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle,profile,description...) OPCODE_SERVOTURNOUT,V(id),OPCODE_PAD,V(pin),OPCODE_PAD,V(activeAngle),OPCODE_PAD,V(inactiveAngle),OPCODE_PAD,V(PCA9685::ProfileType::profile),
#define SET(pin) OPCODE_SET,V(pin),
#define SET(pin,count...) OPCODE_SET,V(pin),OPCODE_PAD,V(#count[0] ? count+0: 1),
#define SET_TRACK(track,mode) OPCODE_SET_TRACK,V(TRACK_MODE_##mode <<8 | TRACK_NUMBER_##track),
#define SET_POWER(track,onoff) OPCODE_SET_POWER,V(TRACK_POWER_##onoff),OPCODE_PAD, V(TRACK_NUMBER_##track),
#define SETLOCO(loco) OPCODE_SETLOCO,V(loco),
Expand Down
1 change: 1 addition & 0 deletions IO_EXSensorCAM.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ void _begin() {
// Configuration isn't done frequently so we can use blocking I2C calls here, and so buffers can
// be allocated from the stack to reduce RAM allocation.
bool _configure(VPIN vpin, ConfigTypeEnum configType, int paramCount, int params[]) override {
(void)configType; (void)params; // unused
if(_verPrint) DIAG(F("_configure() driver IO_EXSensorCAM v0.%d.%d vpin: %d "), driverVer/100,driverVer%100,vpin);
_verPrint=false; //only give driver versions once
if (paramCount != 1) return false;
Expand Down
3 changes: 2 additions & 1 deletion version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

#include "StringFormatter.h"

#define VERSION "5.2.88"
#define VERSION "5.2.89"
// 5.2.89 - EXRAIL SET(vpin[,npins]) RESET(vpin,[,npins]) pin range manipulation
// 5.2.88 - Fix bug where EX-Turntable objects return incorrect angle for home with <JP x>
// 5.2.87 - CamParser and IO_EXSensorCam driver
// 5.2.86 - IO_TCA8418 driver for keypad matrix input now fully functioning, including being able to use an interrupt pin
Expand Down

0 comments on commit 6710c47

Please sign in to comment.