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:
parent
08810dafd7
commit
4b87c879a9
6
DCC.cpp
6
DCC.cpp
|
@ -359,6 +359,7 @@ const ackOp FLASH VERIFY_BYTE_PROG[] = {
|
||||||
BASELINE,
|
BASELINE,
|
||||||
VB,WACK, // validate byte
|
VB,WACK, // validate byte
|
||||||
ITCB, // if ok callback value
|
ITCB, // if ok callback value
|
||||||
|
RCOUNT, // increment ackRetry counter
|
||||||
STARTMERGE, //clear bit and byte values ready for merge pass
|
STARTMERGE, //clear bit and byte values ready for merge pass
|
||||||
// each bit is validated against 0 and the result inverted in MERGE
|
// 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.
|
// 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::ackManagerRetry;
|
||||||
byte DCC::ackRetry = 2;
|
byte DCC::ackRetry = 2;
|
||||||
int16_t DCC::ackRetrySum;
|
int16_t DCC::ackRetrySum;
|
||||||
|
int16_t DCC::ackRetryPSum;
|
||||||
int DCC::ackManagerCv;
|
int DCC::ackManagerCv;
|
||||||
byte DCC::ackManagerBitNum;
|
byte DCC::ackManagerBitNum;
|
||||||
bool DCC::ackReceived;
|
bool DCC::ackReceived;
|
||||||
|
@ -845,6 +847,10 @@ void DCC::ackManagerLoop() {
|
||||||
callback(-1);
|
callback(-1);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case RCOUNT: // ackRetry counter
|
||||||
|
ackRetrySum++;
|
||||||
|
break;
|
||||||
|
|
||||||
case STARTMERGE:
|
case STARTMERGE:
|
||||||
ackManagerBitNum=7;
|
ackManagerBitNum=7;
|
||||||
ackManagerByte=0;
|
ackManagerByte=0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user