mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 12:51:24 +01:00
Change <I><G> to <JI><JG>
This commit is contained in:
parent
c72bf51959
commit
003313998b
@ -79,6 +79,8 @@ const int16_t HASH_KEYWORD_TT=2688;
|
||||
const int16_t HASH_KEYWORD_VPIN=-415;
|
||||
const int16_t HASH_KEYWORD_A='A';
|
||||
const int16_t HASH_KEYWORD_C='C';
|
||||
const int16_t HASH_KEYWORD_G='G';
|
||||
const int16_t HASH_KEYWORD_I='I';
|
||||
const int16_t HASH_KEYWORD_R='R';
|
||||
const int16_t HASH_KEYWORD_T='T';
|
||||
const int16_t HASH_KEYWORD_X='X';
|
||||
@ -503,14 +505,6 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
|
||||
case 'c': // SEND METER RESPONSES <c>
|
||||
// No longer supported because of multiple tracks See <G> and <I>
|
||||
break;
|
||||
|
||||
case 'G': // Track current gauge limits
|
||||
TrackManager::reportGauges(stream); // <g limit...limit>
|
||||
return;
|
||||
|
||||
case 'I': // Track current
|
||||
TrackManager::reportCurrent(stream); // <i mA...mA>
|
||||
return;
|
||||
|
||||
case 'Q': // SENSORS <Q>
|
||||
Sensor::printAll(stream);
|
||||
@ -591,6 +585,16 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
|
||||
}
|
||||
CommandDistributor::setClockTime(p[1], p[2], 1);
|
||||
return;
|
||||
|
||||
case HASH_KEYWORD_G: // <JG> current gauge limits
|
||||
if (params>1) break;
|
||||
TrackManager::reportGauges(stream); // <g limit...limit>
|
||||
return;
|
||||
|
||||
case HASH_KEYWORD_I: // <JI> current values
|
||||
if (params>1) break;
|
||||
TrackManager::reportCurrent(stream); // <g limit...limit>
|
||||
return;
|
||||
|
||||
case HASH_KEYWORD_A: // <JA> returns automations/routes
|
||||
StringFormatter::send(stream, F("<jA"));
|
||||
|
171
Release_Notes/CommandRef.md
Normal file
171
Release_Notes/CommandRef.md
Normal file
@ -0,0 +1,171 @@
|
||||
This file is being used to consolidate the command reference information.
|
||||
|
||||
General points:
|
||||
- Commands below have a single character opcode and parameters.
|
||||
Even <JA> is actually read as <J A>
|
||||
- Keyword parameters are shown in upper case but may be entered in mixed case.
|
||||
- value parameters are numeric.
|
||||
- [something] indicates its optional.
|
||||
- Not all commands have a response, and not all responses come from the last commands that you have issued.
|
||||
|
||||
Startup status
|
||||
<s>
|
||||
|
||||
Track power management
|
||||
<1>
|
||||
<1 MAIN|PROG|JOIN>
|
||||
<0>
|
||||
<0 MAIN|PROG>
|
||||
|
||||
Basic manual control
|
||||
<t cab speed direction>
|
||||
<F cab function 1|0>
|
||||
<!>
|
||||
<T id 0|1|T|C>
|
||||
|
||||
DCC accessory control
|
||||
<a address subaddress activate [onoff]>
|
||||
<a linearaddress activate>
|
||||
|
||||
|
||||
Turnout definition
|
||||
Note: Turnouts are best defined in myAutomation.h where a turnout description can also be provided ( refer to EXRAIL documentation) or by using these commands in a mySetup.h file.
|
||||
|
||||
<T id SERVO vpin thrown closed profile>
|
||||
<T id VPIN vpin>
|
||||
<T id DCC addr subaddr>
|
||||
<T id DCC linearaddr>
|
||||
|
||||
|
||||
Outputs
|
||||
<Z id activate>
|
||||
<Z id vpin iflag>
|
||||
|
||||
Sensors
|
||||
<S id vpin pullup>
|
||||
|
||||
Decoder programming
|
||||
<w cab cv value>
|
||||
<b cab cv bit value>
|
||||
<W cabid>
|
||||
<W cv value>
|
||||
<V cv value>
|
||||
<V cv bit value>
|
||||
<R>
|
||||
<R cv>
|
||||
<B cv bit value>
|
||||
<D ACK ON|OFF>
|
||||
<D ACK LIMIT|MIN|MAX|RETRY value>
|
||||
<D PROGBOOST>
|
||||
|
||||
Advanced DCC control
|
||||
<M packet.... >
|
||||
<P packet ...>
|
||||
<f map1 map2 [map3]>
|
||||
<#>
|
||||
<->
|
||||
<- cabid>
|
||||
<D CABS>
|
||||
<D SPEED28>
|
||||
<D SPEED128>
|
||||
|
||||
|
||||
EEPROM commands
|
||||
These commands exist for
|
||||
backwards JMRI compatibility.
|
||||
You are strongly discouraged from maintaining your configuration settings in EEPROM.
|
||||
<E>
|
||||
<e>
|
||||
<D EEPROM>
|
||||
<T>
|
||||
<T id>
|
||||
<S>
|
||||
<S id>
|
||||
<Z>
|
||||
<Z id>
|
||||
|
||||
Diagnostic commands
|
||||
<D CMD ON|OFF>
|
||||
<D WIFI ON|OFF>
|
||||
<D ETHERNET ON|OFF>
|
||||
<D WIT ON|OFF>
|
||||
<D LCN ON|OFF>
|
||||
<D EXRAIL ON|OFF>
|
||||
<D RESET>
|
||||
<D SERVO|ANOUT vpin position [profile]>
|
||||
<D ANIN vpin>
|
||||
<D HAL SHOW>
|
||||
<D HAL RESET>
|
||||
<+ cmd>
|
||||
<+>
|
||||
<Q>
|
||||
|
||||
User defined filter commands
|
||||
<U ....>
|
||||
<u ....>
|
||||
|
||||
Track Management
|
||||
<=>
|
||||
<= track DCC|PROG|OFF>
|
||||
<= track DC|DCX cabid>
|
||||
<JG>
|
||||
<JI>
|
||||
|
||||
|
||||
Turntable interface
|
||||
<D TT vpin steps [activity]>
|
||||
|
||||
Fast clock interface
|
||||
<JC>
|
||||
<JC mins rate>
|
||||
|
||||
|
||||
Advanced Throttle access to features
|
||||
<t cab>
|
||||
<JA>
|
||||
<JA id>
|
||||
<JR>
|
||||
<JR id>
|
||||
<JT>
|
||||
<JT id>
|
||||
|
||||
*******************
|
||||
EXRAIL Commands
|
||||
*******************
|
||||
|
||||
</>
|
||||
</PAUSE>
|
||||
</RESUME>
|
||||
</START cab sequence>
|
||||
</START sequence>
|
||||
</KILL taskid>
|
||||
</KILL ALL>
|
||||
</RESERVE|FREE blockid>
|
||||
</LATCH|UNLATCH latchid>
|
||||
</RED|AMBER|GREEN signalid>
|
||||
|
||||
Obsolete commands/formats
|
||||
<c>
|
||||
<t ignored cab speed direction>
|
||||
<T id vpin thrown closed>
|
||||
<T id addr subaddr>
|
||||
<B cv bit value obsolete obsolete>
|
||||
<R cv obsolete obsolete>
|
||||
<W cv value obsolete obsolete>
|
||||
|
||||
Broadcast responses
|
||||
Note: broadcasts are sent to all throttles when appropriate (usually because something has changed)
|
||||
|
||||
<p0>
|
||||
<p1>
|
||||
<p1 MAIN|PROG|JOIN>
|
||||
|
||||
<l cab slot dccspeed functionmap>
|
||||
<H id 1|0>
|
||||
<jC mmmm speed>
|
||||
|
||||
Diagnostic responses
|
||||
These are not meant to be software readable. They contain diagnostic information for programmers to identify issues.
|
||||
<X>
|
||||
<* ... *>
|
||||
|
@ -425,7 +425,7 @@ POWERMODE TrackManager::getProgPower() {
|
||||
}
|
||||
|
||||
void TrackManager::reportCurrent(Print* stream) {
|
||||
StringFormatter::send(stream,F("<i"));
|
||||
StringFormatter::send(stream,F("<jI"));
|
||||
FOR_EACH_TRACK(t) {
|
||||
StringFormatter::send(stream, F(" %d"),
|
||||
(track[t]->getPower()==POWERMODE::OVERLOAD) ? -1 :
|
||||
@ -435,7 +435,7 @@ void TrackManager::reportCurrent(Print* stream) {
|
||||
}
|
||||
|
||||
void TrackManager::reportGauges(Print* stream) {
|
||||
StringFormatter::send(stream,F("<g"));
|
||||
StringFormatter::send(stream,F("<jG"));
|
||||
FOR_EACH_TRACK(t) {
|
||||
StringFormatter::send(stream, F(" %d"),
|
||||
track[t]->raw2mA(track[t]->getRawCurrentTripValue()));
|
||||
|
Loading…
Reference in New Issue
Block a user