Aktualisiert auf Stand 29/03/2023
This commit is contained in:
20
src/dcBL.cpp
20
src/dcBL.cpp
@@ -362,8 +362,8 @@ uint8_t dcBL_ChkResponse()
|
||||
if (recLen==0)
|
||||
return 0; // no response by now
|
||||
|
||||
qDebug()<<" DCBL_chkResp got answer " << recLen ;
|
||||
dcBL_writeText("DCBL_chkResp got answer");
|
||||
//qDebug()<<" DCBL_chkResp got answer " << recLen ;
|
||||
//dcBL_writeText("DCBL_chkResp got answer");
|
||||
|
||||
if (buf[0]==2 && buf[1]==(dcBL_LastBLcmd | 0x80) )
|
||||
return 10; // OK
|
||||
@@ -474,9 +474,8 @@ char dcBL_loadBinary(char withDisplay)
|
||||
uint32_t ultmp, fileLen;
|
||||
QString tmpStr="", s2tmp="";
|
||||
|
||||
//QFile file("/own/H2B/dc2.hex"); // laesst sich genauso oeffnen
|
||||
QFile file("/own/H2B/dc2.bin");
|
||||
|
||||
qDebug()<<"dcBL loading DC2c binary...";
|
||||
QFile file("../dc2c4.bin");
|
||||
if (!file.exists())
|
||||
{
|
||||
//qDebug()<<"file _own_H2B_dc2.bin does not exist";
|
||||
@@ -1185,6 +1184,7 @@ void dcBL_iniLoading(void)
|
||||
}
|
||||
|
||||
|
||||
// nicht verwendet
|
||||
void dcBL_startLoading(void)
|
||||
{
|
||||
if (dcBL_step==0 || dcBL_step>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; nn<Sdata_LengthRawData; nn++)
|
||||
Sdata_rawData[nn]=receivedData[nn];
|
||||
qDebug()<<"dcBL got data"<< Sdata_LengthRawData << "bytes :)";
|
||||
//qDebug()<<"dcBL got data"<< Sdata_LengthRawData << "bytes :)";
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user