1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-27 01:56:14 +01:00

Update retry counter

<D ACK RETRY nn>  will also display running total prior to its reset.
RCOUNT step included in Verify program will count when Verify fails
This commit is contained in:
Ash-4 2021-08-30 16:37:06 -05:00 committed by GitHub
parent afe9141671
commit 08810dafd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
DCC.h
View File

@ -41,6 +41,7 @@ enum ackOp : byte
ITCB7, // If True callback(byte &0x7F)
NAKFAIL, // if false callback(-1)
FAIL, // callback(-1)
RCOUNT, // increment ackRetry counter
STARTMERGE, // Clear bit and byte settings ready for merge pass
MERGE, // Merge previous wack response with byte value and decrement bit number (use for readimng CV bytes)
SETBIT, // sets bit number to next prog byte
@ -115,9 +116,11 @@ public:
static inline void setGlobalSpeedsteps(byte s) {
globalSpeedsteps = s;
};
static inline void setAckRetry(byte retry) {
static inline int16_t setAckRetry(byte retry) {
ackRetry = retry;
ackRetryPSum = ackRetrySum;
ackRetrySum = 0; // reset running total
return ackRetryPSum;
};
private:
@ -154,6 +157,7 @@ private:
static byte ackManagerRetry;
static byte ackRetry;
static int16_t ackRetrySum;
static int16_t ackRetryPSum;
static int ackManagerWord;
static byte ackManagerStash;
static bool ackReceived;