modify wave retransfer bugs

This commit is contained in:
zhangsheng 2025-04-07 15:51:25 +08:00
parent fb1ea46e74
commit 539ca9463c
2 changed files with 6 additions and 1 deletions

View File

@ -1023,6 +1023,7 @@ int Uart::FindRecvPackage(int bytesRead, char *mUartRecvBuf, char *head) {
bool wave_error_y = false; bool wave_error_y = false;
bool wave_error_z = false; bool wave_error_z = false;
bytesRead = bytesRead + mlastSize; bytesRead = bytesRead + mlastSize;
for (int i = 0; i < bytesRead; i++) { for (int i = 0; i < bytesRead; i++) {
if (UartRecvBuf[i] == head[0]) { if (UartRecvBuf[i] == head[0]) {
char buf[12] = {0x00}; char buf[12] = {0x00};
@ -1039,7 +1040,7 @@ int Uart::FindRecvPackage(int bytesRead, char *mUartRecvBuf, char *head) {
{ {
continue; continue;
} }
else if (wave_error_x && wave_error_y && !wave_error_z && command == WAVE_Y) else if ((wave_error_x || wave_error_y) && !wave_error_z && command == WAVE_Y)
{ {
continue; continue;
} }

View File

@ -804,6 +804,10 @@ void Uart::DealWave() {
sqlite_db_ctrl::instance().InsertData(" receive_wave_status ", insertSql); sqlite_db_ctrl::instance().InsertData(" receive_wave_status ", insertSql);
} }
scheduler::instance().WaveSuccess(wave_shortAddr); scheduler::instance().WaveSuccess(wave_shortAddr);
}else{
if(scheduler::instance().WaveError(wave_shortAddr) < 0){
zlog_error(zct, "wave size is 0,shortAddr %02x%02x", (wave_shortAddr >> 8) & 0xFF,wave_shortAddr & 0xFF);
}
} }
std::string ran = ""; std::string ran = "";