mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2026-04-28 03:08:08 +00:00
fix overflow and mute
This commit is contained in:
@ -129,7 +129,7 @@ void IrFoxDecoder::write_to_buffer(bool bit, bool pack_trace_invert_fix, uint64_
|
||||
|
||||
if (buf_bit_pos == next_control_bit)
|
||||
{
|
||||
next_control_bit = static_cast<uint8_t>(next_control_bit + (is_data ? irfox::kSyncBits : irfox::kBitPerByte));
|
||||
next_control_bit = next_control_bit + (is_data ? irfox::kSyncBits : irfox::kBitPerByte);
|
||||
is_data = !is_data;
|
||||
i_sync_bit = 0;
|
||||
err_sync_bit = 0;
|
||||
|
||||
@ -127,7 +127,7 @@ private:
|
||||
int16_t buf_bit_pos = 0;
|
||||
bool is_data = true;
|
||||
uint16_t i_data_buffer = 0;
|
||||
uint8_t next_control_bit = irfox::kBitPerByte;
|
||||
uint16_t next_control_bit = irfox::kBitPerByte;
|
||||
uint8_t i_sync_bit = 0;
|
||||
uint8_t err_sync_bit = 0;
|
||||
uint16_t error_counter = 0;
|
||||
|
||||
Reference in New Issue
Block a user