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. "ce84974967cd9771479116a7cde2dfd2d1b627e9" and "ea4f90d5fcd76b59f2a3a4fb0daa5a6f7ceeb815" have entirely different histories.
ce84974967
...
ea4f90d5fc
|
@ -162,7 +162,7 @@ void CommandDistributor::broadcastTurnout(int16_t id, bool isClosed ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommandDistributor::broadcastTurntable(int16_t id, uint8_t position, bool moving) {
|
void CommandDistributor::broadcastTurntable(int16_t id, uint8_t position, bool moving) {
|
||||||
broadcastReply(COMMAND_TYPE, F("<I %d %d %d>\n"), id, position, moving);
|
broadcastReply(COMMAND_TYPE, F("<i %d %d %d>\n"), id, position, moving);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommandDistributor::broadcastClockTime(int16_t time, int8_t rate) {
|
void CommandDistributor::broadcastClockTime(int16_t time, int8_t rate) {
|
||||||
|
|
|
@ -60,8 +60,8 @@ Once a new OPCODE is decided upon, update this list.
|
||||||
G,
|
G,
|
||||||
h,
|
h,
|
||||||
H, Turnout state broadcast
|
H, Turnout state broadcast
|
||||||
i, Server details string
|
i, Reserved for future use - Turntable object broadcast
|
||||||
I, Turntable object command, control, and broadcast
|
I, Reserved for future use - Turntable object command and control
|
||||||
j, Throttle responses
|
j, Throttle responses
|
||||||
J, Throttle queries
|
J, Throttle queries
|
||||||
k, Reserved for future use - Potentially Railcom
|
k, Reserved for future use - Potentially Railcom
|
||||||
|
@ -1244,7 +1244,7 @@ bool DCCEXParser::parseI(Print *stream, int16_t params, int16_t p[])
|
||||||
if (tto) {
|
if (tto) {
|
||||||
bool type = tto->isEXTT();
|
bool type = tto->isEXTT();
|
||||||
uint8_t position = tto->getPosition();
|
uint8_t position = tto->getPosition();
|
||||||
StringFormatter::send(stream, F("<I %d %d>\n"), type, position);
|
StringFormatter::send(stream, F("<i %d %d>\n"), type, position);
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1270,7 +1270,7 @@ bool DCCEXParser::parseI(Print *stream, int16_t params, int16_t p[])
|
||||||
if (!DCCTurntable::create(p[0])) return false;
|
if (!DCCTurntable::create(p[0])) return false;
|
||||||
Turntable *tto = Turntable::get(p[0]);
|
Turntable *tto = Turntable::get(p[0]);
|
||||||
tto->addPosition(0, 0, p[2]);
|
tto->addPosition(0, 0, p[2]);
|
||||||
StringFormatter::send(stream, F("<I>\n"));
|
StringFormatter::send(stream, F("<i>\n"));
|
||||||
} else {
|
} else {
|
||||||
if (!tto) return false;
|
if (!tto) return false;
|
||||||
if (!tto->isEXTT()) return false;
|
if (!tto->isEXTT()) return false;
|
||||||
|
@ -1287,7 +1287,7 @@ bool DCCEXParser::parseI(Print *stream, int16_t params, int16_t p[])
|
||||||
if (!EXTTTurntable::create(p[0], (VPIN)p[2])) return false;
|
if (!EXTTTurntable::create(p[0], (VPIN)p[2])) return false;
|
||||||
Turntable *tto = Turntable::get(p[0]);
|
Turntable *tto = Turntable::get(p[0]);
|
||||||
tto->addPosition(0, 0, p[3]);
|
tto->addPosition(0, 0, p[3]);
|
||||||
StringFormatter::send(stream, F("<I>\n"));
|
StringFormatter::send(stream, F("<i>\n"));
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1301,7 +1301,7 @@ bool DCCEXParser::parseI(Print *stream, int16_t params, int16_t p[])
|
||||||
// tto must exist, no more than 48 positions, angle 0 - 3600
|
// tto must exist, no more than 48 positions, angle 0 - 3600
|
||||||
if (!tto || p[2] > 48 || p[4] < 0 || p[4] > 3600) return false;
|
if (!tto || p[2] > 48 || p[4] < 0 || p[4] > 3600) return false;
|
||||||
tto->addPosition(p[2], p[3], p[4]);
|
tto->addPosition(p[2], p[3], p[4]);
|
||||||
StringFormatter::send(stream, F("<I>\n"));
|
StringFormatter::send(stream, F("<i>\n"));
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,7 @@ public:
|
||||||
for (Turntable *tto = _firstTurntable; tto != 0; tto = tto->_nextTurntable)
|
for (Turntable *tto = _firstTurntable; tto != 0; tto = tto->_nextTurntable)
|
||||||
if (!tto->isHidden()) {
|
if (!tto->isHidden()) {
|
||||||
gotOne = true;
|
gotOne = true;
|
||||||
StringFormatter::send(stream, F("<I %d %d>\n"), tto->getId(), tto->getPosition());
|
StringFormatter::send(stream, F("<i %d %d>\n"), tto->getId(), tto->getPosition());
|
||||||
}
|
}
|
||||||
return gotOne;
|
return gotOne;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
|
|
||||||
#include "StringFormatter.h"
|
#include "StringFormatter.h"
|
||||||
|
|
||||||
#define VERSION "5.1.13"
|
#define VERSION "5.1.12"
|
||||||
// 5.1.13 - Changed turntable broadcast from i to I due to server string conflict
|
|
||||||
// 5.1.12 - Added Power commands <0 A> & <1 A> etc. and update to <=>
|
// 5.1.12 - Added Power commands <0 A> & <1 A> etc. and update to <=>
|
||||||
// Added EXRAIL SET_POWER(track, ON/OFF)
|
// Added EXRAIL SET_POWER(track, ON/OFF)
|
||||||
// Fixed a problem whereby <1 MAIN> also powered on PROG track
|
// Fixed a problem whereby <1 MAIN> also powered on PROG track
|
||||||
|
|
Loading…
Reference in New Issue
Block a user