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

Compare commits

..

No commits in common. "d877fc315ee1ddaedaf463ae883041974f63d36f" and "d2d7a5cd1606b41830c814a047245204ff724d3d" have entirely different histories.

3 changed files with 10 additions and 14 deletions

View File

@ -332,7 +332,7 @@ void RMFT2::setTurntableHiddenState(Turntable * tto) {
char RMFT2::getRouteType(int16_t id) { char RMFT2::getRouteType(int16_t id) {
int16_t progCounter=routeLookup->find(id); int16_t progCounter=routeLookup->find(id);
if (progCounter>=0) { if (progCounter>=0) {
byte type=GET_OPCODE; OPCODE type=GET_OPCODE;
if (type==OPCODE_ROUTE) return 'R'; if (type==OPCODE_ROUTE) return 'R';
if (type==OPCODE_AUTOMATION) return 'A'; if (type==OPCODE_AUTOMATION) return 'A';
} }

View File

@ -122,7 +122,7 @@ void RMFT2::ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16
case 'J': // throttle info commands case 'J': // throttle info commands
// This entire code block is compiled out if FEATURE_ROUTESTATE macros not used // This entire code block is compiled out if FEATURE_ROUTESTATE macros not used
if (paramCount<1) return; if (paramCount<1 || !(compileFeatures & FEATURE_ROUTESTATE)) return;
switch(p[0]) switch(p[0])
case HASH_KEYWORD_A: // <JA> returns automations/routes case HASH_KEYWORD_A: // <JA> returns automations/routes
if (paramCount==1) {// <JA> if (paramCount==1) {// <JA>
@ -137,15 +137,13 @@ void RMFT2::ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16
StringFormatter::send(stream,F("<jA %d %c \"%S\">\n"), StringFormatter::send(stream,F("<jA %d %c \"%S\">\n"),
id, getRouteType(id), getRouteDescription(id)); id, getRouteType(id), getRouteDescription(id));
if (compileFeatures & FEATURE_ROUTESTATE) { // Send any non-default button states or captions
// Send any non-default button states or captions int16_t statePos=routeLookup->findPosition(id);
int16_t statePos=routeLookup->findPosition(id); if (statePos>=0) {
if (statePos>=0) { if (routeStateArray[statePos])
if (routeStateArray[statePos]) StringFormatter::send(stream,F("<jB %d %d>\n"), id, routeStateArray[statePos]);
StringFormatter::send(stream,F("<jB %d %d>\n"), id, routeStateArray[statePos]); if (routeCaptionArray[statePos])
if (routeCaptionArray[statePos]) StringFormatter::send(stream,F("<jB %d \"%S\">\n"), id,routeCaptionArray[statePos]);
StringFormatter::send(stream,F("<jB %d \"%S\">\n"), id,routeCaptionArray[statePos]);
}
} }
opcode=0; opcode=0;
return; return;

View File

@ -676,10 +676,8 @@ void MotorDriver::checkPowerOverload(bool useProgLimit, byte trackno) {
power_sample_overload_wait *= 2; power_sample_overload_wait *= 2;
if (power_sample_overload_wait > POWER_SAMPLE_RETRY_MAX) if (power_sample_overload_wait > POWER_SAMPLE_RETRY_MAX)
power_sample_overload_wait = POWER_SAMPLE_RETRY_MAX; power_sample_overload_wait = POWER_SAMPLE_RETRY_MAX;
#ifdef EXRAIL_ACTIVE
DIAG(F("Calling EXRAIL")); DIAG(F("Calling EXRAIL"));
RMFT2::powerEvent(trackno, true); // Tell EXRAIL we have an overload RMFT2::powerEvent(trackno, true); // Tell EXRAIL we have an overload
#endif
// power on test // power on test
DIAG(F("TRACK %c POWER RESTORE (after %4M)"), trackno + 'A', mslpc); DIAG(F("TRACK %c POWER RESTORE (after %4M)"), trackno + 'A', mslpc);
setPower(POWERMODE::ALERT); setPower(POWERMODE::ALERT);