mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 11:02:19 +08:00
pandad: fix receive buffer size on failed transfer (#32670)
old-commit-hash: 1093a4ac8217030ae4a0c73ba54bc734a6010acc
This commit is contained in:
@@ -220,12 +220,13 @@ bool Panda::can_receive(std::vector<can_frame>& out_vec) {
|
||||
if (!comms_healthy()) {
|
||||
return false;
|
||||
}
|
||||
if (recv == RECV_SIZE) {
|
||||
LOGW("Panda receive buffer full");
|
||||
}
|
||||
receive_buffer_size += recv;
|
||||
|
||||
return (recv <= 0) ? true : unpack_can_buffer(receive_buffer, receive_buffer_size, out_vec);
|
||||
bool ret = true;
|
||||
if (recv > 0) {
|
||||
receive_buffer_size += recv;
|
||||
ret = unpack_can_buffer(receive_buffer, receive_buffer_size, out_vec);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Panda::can_reset_communications() {
|
||||
|
||||
Reference in New Issue
Block a user