Remove block_after_ACK mechanism on NG frames, flashing uses OLD and NG won't use ACK anymore

This commit is contained in:
Philippe Teuwen 2019-04-26 12:02:34 +02:00
commit b12be75a5b

View file

@ -438,10 +438,6 @@ __attribute__((force_align_arg_pointer))
if (!error) { if (!error) {
// PrintAndLogEx(NORMAL, "Received reply NG full !!"); // PrintAndLogEx(NORMAL, "Received reply NG full !!");
PacketResponseReceived(&rx); PacketResponseReceived(&rx);
//TODO NG don't send ACK anymore but reply with the corresponding cmd, still things seem to work fine...
if (rx.cmd == CMD_ACK) {
ACK_received = true;
}
} }
} else { // Old style reply } else { // Old style reply
PacketResponseOLD rx_old; PacketResponseOLD rx_old;
@ -480,6 +476,7 @@ __attribute__((force_align_arg_pointer))
if (connection->block_after_ACK) { if (connection->block_after_ACK) {
// if we just received an ACK, wait here until a new command is to be transmitted // if we just received an ACK, wait here until a new command is to be transmitted
// This is only working on OLD frames, and only used by flasher
if (ACK_received) { if (ACK_received) {
while (!txBuffer_pending) { while (!txBuffer_pending) {
pthread_cond_wait(&txBufferSig, &txBufferMutex); pthread_cond_wait(&txBufferSig, &txBufferMutex);