Add debug output

This commit is contained in:
Siegfried Siegert 2023-05-19 15:34:28 +02:00
parent 3ac91305d4
commit ca5e43e0d7
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03
4 changed files with 16 additions and 4 deletions

View File

@ -19,7 +19,7 @@ void T_com::writeToSerial(const QByteArray &data, uint16_t sendLength)
sendLen=sendLength; sendLen=sendLength;
if (CatSerial->isOpen()) if (CatSerial->isOpen())
{ {
//qDebug() << "sending..." << sendBuffer; qCritical() << "sending..." << sendBuffer;
CatSerial->write(sendBuffer); CatSerial->write(sendBuffer);
} else } else
qDebug() << "error sending, port is not open"; qDebug() << "error sending, port is not open";

View File

@ -887,14 +887,20 @@ char T_datif::loadRecDataFromFrame()
ret=myDCIF->getReceivedInData(&SlaveAdr, &readSource, &readAddress, &RdDleng, receivedData); ret=myDCIF->getReceivedInData(&SlaveAdr, &readSource, &readAddress, &RdDleng, receivedData);
// 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)
{ {
// qDebug() << "datif: rec data not valid"; qCritical() << "datif: rec data not valid";
return 0; return 0;
} }
gpi_storeRecPayLoad(RdDleng, receivedData); // save for host (user of hwapi) gpi_storeRecPayLoad(RdDleng, receivedData); // save for host (user of hwapi)
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 ",
@ -1212,7 +1218,7 @@ char T_datif::loadRecDataFromFrame()
break; break;
case CMD2DC_EMP_GET_ALL: //23 case CMD2DC_EMP_GET_ALL: //23
//qDebug() << "got emp parameters "<< receivedData[1]; qCritical() << "got emp parameters "<< receivedData[1];
gpi_storeEmpSettings(64, receivedData); gpi_storeEmpSettings(64, receivedData);
break; break;

View File

@ -3703,6 +3703,8 @@ uint8_t hwapi::cash_paymentProcessing(void) const
// 90: stop all, 1s delay // 90: stop all, 1s delay
// 99: off, all stopped // 99: off, all stopped
//qCritical() << "empState = " << empState;
sys_getDynMachineConditions(&myDynMachCond); sys_getDynMachineConditions(&myDynMachCond);
payInProg= myDynMachCond.paymentInProgress; payInProg= myDynMachCond.paymentInProgress;
// 0: stopped by timeout // 0: stopped by timeout

View File

@ -433,7 +433,8 @@ uint8_t recBuffer[FRAME_MAXLEN];
// read from "VCP": // read from "VCP":
mySerialPort->readFromSerial(Indata, recLength); mySerialPort->readFromSerial(Indata, recLength);
//qDebug()<<"prot: got data " << recLength; qCritical()<<"prot: got data " << recLength;
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++)
@ -443,6 +444,9 @@ uint8_t recBuffer[FRAME_MAXLEN];
tempStr.clear(); tempStr.clear();
//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;
if (result>0) if (result>0)
{ {
// dann anzeige // dann anzeige