1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-23 08:06:13 +01:00

RCOUNT step added to Verify byte program

This commit is contained in:
Ash-4 2021-08-30 16:52:50 -05:00 committed by GitHub
parent 08810dafd7
commit 4b87c879a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -359,6 +359,7 @@ const ackOp FLASH VERIFY_BYTE_PROG[] = {
BASELINE,
VB,WACK, // validate byte
ITCB, // if ok callback value
RCOUNT, // increment ackRetry counter
STARTMERGE, //clear bit and byte values ready for merge pass
// each bit is validated against 0 and the result inverted in MERGE
// this is because there tend to be more zeros in cv values than ones.
@ -693,6 +694,7 @@ int DCC::ackManagerWord;
byte DCC::ackManagerRetry;
byte DCC::ackRetry = 2;
int16_t DCC::ackRetrySum;
int16_t DCC::ackRetryPSum;
int DCC::ackManagerCv;
byte DCC::ackManagerBitNum;
bool DCC::ackReceived;
@ -844,7 +846,11 @@ void DCC::ackManagerLoop() {
case FAIL: // callback(-1)
callback(-1);
return;
case RCOUNT: // ackRetry counter
ackRetrySum++;
break;
case STARTMERGE:
ackManagerBitNum=7;
ackManagerByte=0;