Add debug output

This commit is contained in:
Siegfried Siegert 2023-05-23 10:23:04 +02:00
parent 584e3af035
commit 1f9cc3b8c0
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03
2 changed files with 11 additions and 8 deletions

View File

@ -888,9 +888,6 @@ char T_datif::loadRecDataFromFrame()
// retval: data valid, only one time true, true if CommandState OK and readState OK
gpi_storeResultOfLastRequest(ret);
qCritical() << "loadRecDataFromFrame() readSource = " << readSource;
if (ret==false)
{
qCritical() << "datif: rec data not valid";
@ -900,7 +897,7 @@ char T_datif::loadRecDataFromFrame()
gpi_storeRecPayLoad(RdDleng, receivedData); // save for host (user of hwapi)
qCritical() << "loadRecDataFromFrame() readSource = " << readSource;
//qCritical() << "loadRecDataFromFrame() readSource = " << readSource;
//qDebug() << "\n datif: got valid data, rdsrc:" << readSource << " rdadd:" << readAddress
// << " rdlen:" << RdDleng;
// qDebug("datif_recData: %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d ",
@ -1218,11 +1215,14 @@ char T_datif::loadRecDataFromFrame()
break;
case CMD2DC_EMP_GET_ALL: //23
qCritical() << "got emp parameters "<< receivedData[1];
//qCritical() << "got emp parameters "<< receivedData[1];
gpi_storeEmpSettings(64, receivedData);
break;
case CMD2DC_EMP_GOTCOIN: //108
//qCritical() << "loadRecDataFromFrame() readSource = " << readSource;
// DB0: 1=coin 0xFF=error 0=got nothing
// DB1: last coin signal (value / scale)
// DB2,3: last coin value
@ -1387,6 +1387,9 @@ char T_datif::loadRecDataFromFrame()
break;
case 112: // get inserted amount in cent in sum
//qCritical() << "loadRecDataFromFrame() readSource = " << readSource;
// 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]);

View File

@ -433,8 +433,8 @@ uint8_t recBuffer[FRAME_MAXLEN];
// read from "VCP":
mySerialPort->readFromSerial(Indata, recLength);
qCritical()<<"prot: got data " << recLength;
qCritical()<<" Indata: " << Indata;
//qCritical()<<"prot: got data " << recLength;
//qCritical()<<" Indata: " << Indata;
if (recLength>FRAME_MAXLEN)
recLength=FRAME_MAXLEN;
for (int nn=0; nn<recLength; nn++)
@ -445,7 +445,7 @@ uint8_t recBuffer[FRAME_MAXLEN];
//uint8_t result=FramecheckInData(recBuffer, recLength); // check input data (response from slave)
uint8_t result=FastCheckInData(recBuffer, recLength); // check input data (response from slave)
qCritical()<<" FastCheckInData() result = " << result;
//qCritical()<<" FastCheckInData() result = " << result;
if (result>0)
{