Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OLS Improvements #51

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hardware/openbench-logic-sniffer/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
return SR_ERR;

/* Reset all operational states. */
devc->rle_count = devc->sample_buf_size = 0;
devc->rle_count = 0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably correct, but maybe one sentence to the commit message explaining why it is now always up to date?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I amended the commit message (it's because the buffer and its size were reset in different functions, at different times).

devc->cnt_samples = devc->raw_sample_size = 0;
devc->cnt_rx_bytes = devc->cnt_rx_raw_samples = 0;
memset(devc->raw_sample, 0, 4);
Expand Down
1 change: 1 addition & 0 deletions src/hardware/openbench-logic-sniffer/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ SR_PRIV int ols_receive_data(int fd, int revents, void *cb_data)

g_free(devc->sample_buf);
devc->sample_buf = 0;
devc->sample_buf_size = 0;

serial_flush(serial);
abort_acquisition(sdi);
Expand Down