Compare commits

...

4 Commits

Author SHA1 Message Date
de61de85f1 Merge branch 'fix_validDataIssue' 2024-09-26 13:26:19 +02:00
4e58fbe4e1 Add plausibility check for inserted coins 2024-09-26 11:48:39 +02:00
647dc9fe4b Handle: valid data problem while start with coin attached:
Enable command 30 also during sell
2024-09-26 11:45:10 +02:00
433af98de7 Fix: setupStep sequence 2024-07-25 15:34:47 +02:00
2 changed files with 16 additions and 10 deletions

View File

@@ -114,7 +114,7 @@ void CArun::chainControl(void)
case SETUP_STEP::OPEN_SERIAL_PORT:
qCritical() << "CArun: SETUP_STEP::OPEN_SERIAL_PORT";
this->openSerialPort();
this->setupStep = SETUP_STEP::CHECK_VALID_DATA;
this->setupStep = SETUP_STEP::TEST_OPEN_PORT;
this->timerChainCtrl->start();
break;
case SETUP_STEP::TEST_OPEN_PORT:
@@ -151,7 +151,7 @@ void CArun::chainControl(void)
this->HWaccess->dc_autoRequest(1);
this->setupStep = SETUP_STEP::CHECK_VALID_DATA;
this->timerChainCtrl->start();
this->timerChainCtrl->start(2000);
break;
case SETUP_STEP::CHECK_VALID_DATA:
qCritical() << "CArun: SETUP_STEP::CHECK_VALID_DATA";

View File

@@ -400,7 +400,7 @@ char T_datif::sendINrequestsAutomatic(void)
uint8_t datif_maxNrCommands=35, datif_sendNow;
// send quicker while transaction is ongoing:
uint8_t datif_vendRequCommandList[15]={102,107,108,110,112,115,116,31,32,40,41,42,23,0,0};
uint8_t datif_vendRequCommandList[15]={102,107,108,110,112,115,116,30,31,32,40,41,42,23,0};
uint8_t datif_maxVendingCmds=13;
// special commands:
@@ -1012,11 +1012,16 @@ char T_datif::loadRecDataFromFrame()
uit2=uchar2uint(receivedData[7],receivedData[6]); // value of last coin
//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)
{
uitmp=0;
uit2=0;
}
if (uit2==3 || uit2==5 || uit2==10 || uit2==20 || uit2==50 || uit2==100 || uit2==200 || uit2==500)
{
// valid coin
if ((newInsertedAmount != lastInsertedAmount) || uit2>0 )
{
gpi_storeCurrentPayment(newInsertedAmount, uitmp, uit2);
@@ -1025,6 +1030,7 @@ char T_datif::loadRecDataFromFrame()
lastInsertedAmount=newInsertedAmount;
//qCritical()<<"datif 112 store and emit new coin "<<newInsertedAmount<<" "<<uitmp<<" "<<uit2;
}
}
break;