Add debug output
This commit is contained in:
parent
584e3af035
commit
1f9cc3b8c0
@ -888,9 +888,6 @@ char T_datif::loadRecDataFromFrame()
|
|||||||
// retval: data valid, only one time true, true if CommandState OK and readState OK
|
// retval: data valid, only one time true, true if CommandState OK and readState OK
|
||||||
gpi_storeResultOfLastRequest(ret);
|
gpi_storeResultOfLastRequest(ret);
|
||||||
|
|
||||||
|
|
||||||
qCritical() << "loadRecDataFromFrame() readSource = " << readSource;
|
|
||||||
|
|
||||||
if (ret==false)
|
if (ret==false)
|
||||||
{
|
{
|
||||||
qCritical() << "datif: rec data not valid";
|
qCritical() << "datif: rec data not valid";
|
||||||
@ -900,7 +897,7 @@ char T_datif::loadRecDataFromFrame()
|
|||||||
gpi_storeRecPayLoad(RdDleng, receivedData); // save for host (user of hwapi)
|
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
|
//qDebug() << "\n datif: got valid data, rdsrc:" << readSource << " rdadd:" << readAddress
|
||||||
// << " rdlen:" << RdDleng;
|
// << " rdlen:" << RdDleng;
|
||||||
// qDebug("datif_recData: %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d ",
|
// 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;
|
break;
|
||||||
|
|
||||||
case CMD2DC_EMP_GET_ALL: //23
|
case CMD2DC_EMP_GET_ALL: //23
|
||||||
qCritical() << "got emp parameters "<< receivedData[1];
|
//qCritical() << "got emp parameters "<< receivedData[1];
|
||||||
gpi_storeEmpSettings(64, receivedData);
|
gpi_storeEmpSettings(64, receivedData);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD2DC_EMP_GOTCOIN: //108
|
case CMD2DC_EMP_GOTCOIN: //108
|
||||||
|
|
||||||
|
//qCritical() << "loadRecDataFromFrame() readSource = " << readSource;
|
||||||
|
|
||||||
// DB0: 1=coin 0xFF=error 0=got nothing
|
// DB0: 1=coin 0xFF=error 0=got nothing
|
||||||
// DB1: last coin signal (value / scale)
|
// DB1: last coin signal (value / scale)
|
||||||
// DB2,3: last coin value
|
// DB2,3: last coin value
|
||||||
@ -1387,6 +1387,9 @@ char T_datif::loadRecDataFromFrame()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 112: // get inserted amount in cent in sum
|
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
|
// 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]);
|
newInsertedAmount=uchar2ulong(receivedData[3],receivedData[2],receivedData[1],receivedData[0]);
|
||||||
uitmp=uchar2uint(receivedData[5],receivedData[4]);
|
uitmp=uchar2uint(receivedData[5],receivedData[4]);
|
||||||
|
@ -433,8 +433,8 @@ uint8_t recBuffer[FRAME_MAXLEN];
|
|||||||
|
|
||||||
// read from "VCP":
|
// read from "VCP":
|
||||||
mySerialPort->readFromSerial(Indata, recLength);
|
mySerialPort->readFromSerial(Indata, recLength);
|
||||||
qCritical()<<"prot: got data " << recLength;
|
//qCritical()<<"prot: got data " << recLength;
|
||||||
qCritical()<<" Indata: " << Indata;
|
//qCritical()<<" Indata: " << Indata;
|
||||||
if (recLength>FRAME_MAXLEN)
|
if (recLength>FRAME_MAXLEN)
|
||||||
recLength=FRAME_MAXLEN;
|
recLength=FRAME_MAXLEN;
|
||||||
for (int nn=0; nn<recLength; nn++)
|
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=FramecheckInData(recBuffer, recLength); // check input data (response from slave)
|
||||||
uint8_t result=FastCheckInData(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)
|
if (result>0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user