ols: Properly initialize entire single-sample buffer before start
The single sample buffer, up to 4 bytes long, was not getting initialized on (every) acquisition start, only after the first full sample was in. This caused the first sample to potentially hold garbage.
This commit is contained in:
parent
eb1b610b12
commit
abb39e6b8c
|
@ -503,6 +503,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
|
|||
|
||||
/* Reset all operational states. */
|
||||
devc->num_transfers = devc->num_samples = devc->num_bytes = 0;
|
||||
memset(devc->sample, 0, 4);
|
||||
|
||||
/* Send header packet to the session bus. */
|
||||
std_session_send_df_header(cb_data, LOG_PREFIX);
|
||||
|
|
Loading…
Reference in New Issue