mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +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:
parent
afe9141671
commit
08810dafd7
6
DCC.h
6
DCC.h
|
@ -41,6 +41,7 @@ enum ackOp : byte
|
||||||
ITCB7, // If True callback(byte &0x7F)
|
ITCB7, // If True callback(byte &0x7F)
|
||||||
NAKFAIL, // if false callback(-1)
|
NAKFAIL, // if false callback(-1)
|
||||||
FAIL, // callback(-1)
|
FAIL, // callback(-1)
|
||||||
|
RCOUNT, // increment ackRetry counter
|
||||||
STARTMERGE, // Clear bit and byte settings ready for merge pass
|
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)
|
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
|
SETBIT, // sets bit number to next prog byte
|
||||||
|
@ -115,9 +116,11 @@ public:
|
||||||
static inline void setGlobalSpeedsteps(byte s) {
|
static inline void setGlobalSpeedsteps(byte s) {
|
||||||
globalSpeedsteps = s;
|
globalSpeedsteps = s;
|
||||||
};
|
};
|
||||||
static inline void setAckRetry(byte retry) {
|
static inline int16_t setAckRetry(byte retry) {
|
||||||
ackRetry = retry;
|
ackRetry = retry;
|
||||||
|
ackRetryPSum = ackRetrySum;
|
||||||
ackRetrySum = 0; // reset running total
|
ackRetrySum = 0; // reset running total
|
||||||
|
return ackRetryPSum;
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -154,6 +157,7 @@ private:
|
||||||
static byte ackManagerRetry;
|
static byte ackManagerRetry;
|
||||||
static byte ackRetry;
|
static byte ackRetry;
|
||||||
static int16_t ackRetrySum;
|
static int16_t ackRetrySum;
|
||||||
|
static int16_t ackRetryPSum;
|
||||||
static int ackManagerWord;
|
static int ackManagerWord;
|
||||||
static byte ackManagerStash;
|
static byte ackManagerStash;
|
||||||
static bool ackReceived;
|
static bool ackReceived;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user