From bed98c2c0e562c7ea34310cf08ede47e76b2b883 Mon Sep 17 00:00:00 2001 From: Siegfried Siegert Date: Wed, 22 May 2024 12:54:00 +0200 Subject: [PATCH] Fix: reset 'lastInsertedAmount' ... affects direct coin input / cash-payment. --- src/datIf.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/datIf.cpp b/src/datIf.cpp index 19495f9..8496dfa 100644 --- a/src/datIf.cpp +++ b/src/datIf.cpp @@ -990,8 +990,8 @@ char T_datif::loadRecDataFromFrame() case 112: // get inserted amount in cent in sum // byte 0..3: amount just paid 4,5:last coin type 6,7: last coin value newInsertedAmount=uchar2ulong(receivedData[3],receivedData[2],receivedData[1],receivedData[0]); - uitmp=uchar2uint(receivedData[5],receivedData[4]); - uit2=uchar2uint(receivedData[7],receivedData[6]); + uitmp=uchar2uint(receivedData[5],receivedData[4]); // last coin type + uit2=uchar2uint(receivedData[7],receivedData[6]); // last coin value //if (uitmp>0) // nur 1x bei neuer Münze 6.10.23 aendern: // beim Wechsler hat die kleinste Muenze immer coin type 0! if (uitmp>10000 || uit2>10000) @@ -999,7 +999,7 @@ char T_datif::loadRecDataFromFrame() uitmp=0; uit2=0; } - if (newInsertedAmount != lastInsertedAmount) + if ((newInsertedAmount != lastInsertedAmount) || uit2>0) // 22.5.2024 { gpi_storeCurrentPayment(newInsertedAmount, uitmp, uit2); emit datif_gotNewCoin(); // OR BILL if (uitmp & 0x8000)>0