From e4a2f8fce3ad84daa5f7abbedf9441e2b340ab3e Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Thu, 30 Mar 2023 08:44:14 +0200 Subject: [PATCH] Aktualisiert auf Stand 29/03/2023 --- include/dcBL.h | 1 + include/hwapi.h | 12 +++++++----- src/datIf.cpp | 18 +++++++++--------- src/dcBL.cpp | 20 +++++++++++--------- src/hwapi.cpp | 29 ++++++++++++++++++++++++----- src/prot.cpp | 11 ++++++----- 6 files changed, 58 insertions(+), 33 deletions(-) diff --git a/include/dcBL.h b/include/dcBL.h index 0c85688..f605270 100644 --- a/include/dcBL.h +++ b/include/dcBL.h @@ -95,6 +95,7 @@ uint8_t dcBL_sendSuccess(uint8_t lastCommand); // return val: 0: no response by now 1:error 10: OK // lastCommand=0x21 for sendAddr or 0x22 for send data +char dcBL_loadBinary(char withDisplay); diff --git a/include/hwapi.h b/include/hwapi.h index 1beda9a..04c1331 100644 --- a/include/hwapi.h +++ b/include/hwapi.h @@ -71,7 +71,7 @@ Level 3): send command: "start payment process" #include #include #include -#include +#include <../plugins/interfaces.h> #include "datIf.h" @@ -988,6 +988,8 @@ public: uint8_t bl_wasSendingAddOK(void) const override; // return val: 0: no response by now 1:error 10: OK + void bl_openBinary(void) const override; + void bl_sendDataBlock(uint8_t length, u_int8_t *buffer) const override; // send 64 byte from bin file @@ -998,9 +1000,9 @@ public: void bl_stopBL(void) const override; - bool bl_isDiagAvailable(void) const override; + //bool bl_isDiagAvailable(void) const override; - QString dc_getDiagText(void) const override; + //QString dc_getDiagText(void) const override; @@ -1008,9 +1010,9 @@ public: // Komplett-schreib Funktion, noch nicht getestet // Nachteil: keine Rückmeldung wie lang's noch dauert - void bl_startSending(void) const override; + //void bl_startSending(void) const override; - void bl_sendFile(void) const override; + //void bl_sendFile(void) const override; diff --git a/src/datIf.cpp b/src/datIf.cpp index cc12325..3bf1614 100644 --- a/src/datIf.cpp +++ b/src/datIf.cpp @@ -120,7 +120,7 @@ char T_datif::datif_cycleSend() if (dbl>0) { cycl_running=1; - qDebug() << "datif: sending 160 byte block, len: " << dataBufLen; + //qDebug() << "datif: sending 160 byte block, len: " << dataBufLen; datif_OUT_SendRandomData(dataSendBuf, dataBufLen); BlockCounter=0; return 0; @@ -151,7 +151,7 @@ char T_datif::datif_cycleSend() } else if (who==3) { - qDebug() << "datif: sending printer text, docnr: " <17) @@ -1200,13 +1200,15 @@ void dcBL_startLoading(void) } + +// nicht verwendet uint8_t dcBL_sendHexfile(void) { QString tmpStr=""; uint8_t buf[70], sendBuf[160], len, sendLen, gotResp; //, recLen; recBuff[160], ii, QString stemp=" "; uint32_t ultmp; - uint8_t uit8tmp, ii; + //uint8_t uit8tmp, ii; gotResp=dcBL_ChkResponse(); @@ -1261,7 +1263,7 @@ uint8_t dcBL_sendHexfile(void) len=dcBL_getFileBlock(dcBL_BlkCtr, buf); // read from file, len = 0...64 //lastBlkLength=len; // recognize last block or end sendLen=dcBL_prepareDC_BLcmd(0x22, len, buf, sendBuf); // pack into protocol frame - +/* // Kontrolle: qDebug()<<"dcBL sending: "; ii=0; @@ -1273,7 +1275,7 @@ uint8_t dcBL_sendHexfile(void) qDebug() << stemp << " "; // Anzeige in hex } while (ii<100); - +*/ sendWRcmd_setSendBlock160(sendLen, sendBuf); // send 140 bytes delay(100); dcBL_writeText("blk nr: "); @@ -1392,7 +1394,7 @@ void gpi_storeRawReceivedData(uint8_t RdDlen, uint8_t *receivedData) Sdata_LengthRawData=RAW_BL_DATALEN; for (nn=0; nn64) LL=64; + tslib_strclr(sendBuf,0,80); +/* hier ist alles richtig + qDebug() << "bl_sendDataBlock "<setRecLen(100); // how many?? //readAddress= // needed?? - qDebug()<<"prot: got BL data " << len << "bytes, "; - for (int i=0; ireadFromSerial(Indata, recLength); -qDebug()<<"prot: got data " << recLength; +//qDebug()<<"prot: got data " << recLength; if (recLength>FRAME_MAXLEN) recLength=FRAME_MAXLEN; for (int nn=0; nn