Skip to content

Commit

Permalink
Fix incorrect write position
Browse files Browse the repository at this point in the history
Signed-off-by: yah01 <[email protected]>
  • Loading branch information
yah01 committed Oct 26, 2023
1 parent 1eed6cc commit b9aee50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion armsrc/lfsampling.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ void logSample(uint8_t sample, uint8_t decimation, uint8_t bits_per_sample, bool
uint8_t bits_cap = 8 - bits_offset;

// write the current byte
data.buffer[samples.numbits] |= sample >> bits_offset;
data.buffer[samples.numbits>>3] |= sample >> bits_offset;
int numbtis = data.numbits + bits_cap;

// write the remaining bits to the next byte
Expand Down

0 comments on commit b9aee50

Please sign in to comment.