1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

Updated CV read command <R cv>

Equivalent to <V cv 0>  uses the verify callback.
This commit is contained in:
Ash-4 2022-05-02 18:58:03 -05:00 committed by GitHub
parent b2df10a99a
commit 7b40bd3290
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -382,6 +382,13 @@ void DCCEXParser::parse(Print *stream, byte *com, RingStream * ringStream)
return; return;
case 'R': // READ CV ON PROG case 'R': // READ CV ON PROG
if (params == 1)
{ // <R CV> -- uses verify callback
if (!stashCallback(stream, p, ringStream))
break;
DCC::verifyCVByte(p[0], p[1], callback_Vbyte);
return;
}
if (params == 3) if (params == 3)
{ // <R CV CALLBACKNUM CALLBACKSUB> { // <R CV CALLBACKNUM CALLBACKSUB>
if (!stashCallback(stream, p, ringStream)) if (!stashCallback(stream, p, ringStream))