From 03372f21e28adf03808c2b8dda725d7f9692306b Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Fri, 4 Mar 2022 23:35:14 +0100 Subject: [PATCH] rename FAIL to CALLFAIL because of conflict in ESP32 IDE --- DCC.cpp | 22 +++++++++++----------- DCCACK.cpp | 2 +- DCCACK.h | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/DCC.cpp b/DCC.cpp index 25d56b5..5188cda 100644 --- a/DCC.cpp +++ b/DCC.cpp @@ -300,14 +300,14 @@ const ackOp FLASH WRITE_BIT0_PROG[] = { W0,WACK, V0, WACK, // validate bit is 0 ITC1, // if acked, callback(1) - FAIL // callback (-1) + CALLFAIL // callback (-1) }; const ackOp FLASH WRITE_BIT1_PROG[] = { BASELINE, W1,WACK, V1, WACK, // validate bit is 1 ITC1, // if acked, callback(1) - FAIL // callback (-1) + CALLFAIL // callback (-1) }; const ackOp FLASH VERIFY_BIT0_PROG[] = { @@ -316,7 +316,7 @@ const ackOp FLASH VERIFY_BIT0_PROG[] = { ITC0, // if acked, callback(0) V1, WACK, // validate bit is 1 ITC1, - FAIL // callback (-1) + CALLFAIL // callback (-1) }; const ackOp FLASH VERIFY_BIT1_PROG[] = { BASELINE, @@ -324,7 +324,7 @@ const ackOp FLASH VERIFY_BIT1_PROG[] = { ITC1, // if acked, callback(1) V0, WACK, ITC0, - FAIL // callback (-1) + CALLFAIL // callback (-1) }; const ackOp FLASH READ_BIT_PROG[] = { @@ -333,7 +333,7 @@ const ackOp FLASH READ_BIT_PROG[] = { ITC1, // if acked, callback(1) V0, WACK, // validate bit is zero ITC0, // if acked callback 0 - FAIL // bit not readable + CALLFAIL // bit not readable }; const ackOp FLASH WRITE_BYTE_PROG[] = { @@ -341,7 +341,7 @@ const ackOp FLASH WRITE_BYTE_PROG[] = { WB,WACK,ITC1, // Write and callback(1) if ACK // handle decoders that dont ack a write VB,WACK,ITC1, // validate byte and callback(1) if correct - FAIL // callback (-1) + CALLFAIL // callback (-1) }; const ackOp FLASH VERIFY_BYTE_PROG[] = { @@ -367,7 +367,7 @@ const ackOp FLASH VERIFY_BYTE_PROG[] = { V0, WACK, MERGE, V0, WACK, MERGE, VB, WACK, ITCBV, // verify merged byte and return it if acked ok - with retry report - FAIL }; + CALLFAIL }; const ackOp FLASH READ_CV_PROG[] = { @@ -390,7 +390,7 @@ const ackOp FLASH READ_CV_PROG[] = { V0, WACK, MERGE, V0, WACK, MERGE, VB, WACK, ITCB, // verify merged byte and return it if acked ok - FAIL }; // verification failed + CALLFAIL }; // verification failed const ackOp FLASH LOCO_ID_PROG[] = { @@ -456,7 +456,7 @@ const ackOp FLASH LOCO_ID_PROG[] = { V0, WACK, MERGE, V0, WACK, MERGE, VB, WACK, ITCB, // verify merged byte and callback - FAIL + CALLFAIL }; const ackOp FLASH SHORT_LOCO_ID_PROG[] = { @@ -473,7 +473,7 @@ const ackOp FLASH SHORT_LOCO_ID_PROG[] = { SETBYTEL, // low byte of word WB,WACK, // some decoders don't ACK writes VB,WACK,ITCB, - FAIL + CALLFAIL }; const ackOp FLASH LONG_LOCO_ID_PROG[] = { @@ -497,7 +497,7 @@ const ackOp FLASH LONG_LOCO_ID_PROG[] = { SETBYTEL, // low byte of word WB,WACK, VB,WACK,ITC1, // callback(1) means Ok - FAIL + CALLFAIL }; void DCC::writeCVByte(int16_t cv, byte byteValue, ACK_CALLBACK callback) { diff --git a/DCCACK.cpp b/DCCACK.cpp index 8afe0f9..bc115c0 100644 --- a/DCCACK.cpp +++ b/DCCACK.cpp @@ -260,7 +260,7 @@ void DCCACK::loop() { } break; - case FAIL: // callback(-1) + case CALLFAIL: // callback(-1) callback(-1); return; diff --git a/DCCACK.h b/DCCACK.h index 8536ce1..7d39319 100644 --- a/DCCACK.h +++ b/DCCACK.h @@ -44,7 +44,7 @@ enum ackOp : byte ITCBV, // If True callback(byte) - end of Verify Byte ITCB7, // If True callback(byte &0x7F) NAKFAIL, // if false callback(-1) - FAIL, // callback(-1) + CALLFAIL, // callback(-1) BIV, // Set ackManagerByte to initial value for Verify retry 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)