Add collected changes from T.Sax
This commit is contained in:
10
src/prot.cpp
Normal file → Executable file
10
src/prot.cpp
Normal file → Executable file
@@ -97,14 +97,22 @@ void T_prot::setRecLen(uint16_t ReadCmd)
|
||||
|
||||
void T_prot::setUserWriteData(uint16_t WriteCmd, uint16_t WrAddr, uint8_t WrDatLen, uint8_t *data)
|
||||
{
|
||||
int nn;
|
||||
WriteCommand=WriteCmd;
|
||||
WriteAddr=WrAddr;
|
||||
WrDataLength=WrDatLen;
|
||||
if (WrDataLength>FRAME_DATALEN)
|
||||
WrDataLength=FRAME_DATALEN;
|
||||
|
||||
for (int nn=0; nn<WrDataLength; nn++)
|
||||
// ui8BLsendData[BL_DATA_LEN];
|
||||
|
||||
for (nn=0; nn<WrDataLength; nn++)
|
||||
ui8OutputData[nn]=data[nn];
|
||||
|
||||
// clear the rest. added at 26.6.2024TS. important for printer text
|
||||
for (nn=WrDataLength; nn<FRAME_DATALEN; nn++)
|
||||
ui8OutputData[nn]=0;
|
||||
|
||||
SendDataValid=1; // always set WR first
|
||||
kindOfData=0; // 0: binaries, 1:text
|
||||
this->setRecLen(100); // default: short response
|
||||
|
Reference in New Issue
Block a user