Skip to content

Commit

Permalink
fix ir logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Lance798 authored and Alx-Lai committed Aug 17, 2024
1 parent e6ce1c2 commit 5084edd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions fw/Core/Hitcon/Logic/IrLogic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ void IrLogic::OnBufferReceived(uint8_t *buffer) {
g_suspender.DecBlocker();
packet_buf = 0;
bit = 0;
memset(&rx_packet, 0, sizeof(IrPacket));
break;

default:
Expand Down
2 changes: 1 addition & 1 deletion fw/Core/Hitcon/Logic/IrLogic.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct IrPacket {
// We need to add 3 bytes because we need
// at least 1 byte to accomodate the size.
// at least 1 byte to accomodate the chksum.
uint8_t data_[MAX_PACKET_PAYLOAD_BYTES + 3];
uint8_t data_[MAX_PACKET_PAYLOAD_BYTES + 4];
size_t size_;
};

Expand Down

0 comments on commit 5084edd

Please sign in to comment.