-
Notifications
You must be signed in to change notification settings - Fork 397
OLS Improvements #51
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
base: master
Are you sure you want to change the base?
OLS Improvements #51
Changes from 1 commit
8ea06d6
e5dc9e6
86bf1d5
fd87a59
23f9047
b3ef78e
6621a22
c67f087
f05c040
84d6e00
72fae1a
7fc0db4
3a39f13
05e39c5
1a2437b
e068d80
fadfd5e
e58ecb2
6af1de2
5696a4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -114,16 +114,16 @@ struct dev_context { | |
| int trigger_at_smpl; | ||
| uint16_t capture_flags; | ||
|
|
||
| unsigned int num_samples; | ||
| int num_bytes; | ||
| int cnt_bytes; | ||
| int cnt_samples; | ||
| int cnt_samples_rle; | ||
| unsigned int cnt_rx_bytes; /* number of bytes received */ | ||
| unsigned int raw_sample_size; /* valid bytes in sample[4] */ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. comment should be 'raw_sample[4]'? I didn't verify the code and trust the author and the compiler for that :) From the changes in the header, it looks much more readable with this change. Good.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exactly. Fixed. And thank you! |
||
| unsigned char | ||
| raw_sample[4]; /* raw sample, assembled from received bytes */ | ||
| unsigned int cnt_rx_raw_samples; /* number of raw samples received */ | ||
|
|
||
| unsigned int rle_count; | ||
| unsigned char sample[4]; | ||
| unsigned char *raw_sample_buf; | ||
| unsigned int raw_sample_buf_size; | ||
| unsigned char *sample_buf; | ||
| unsigned int sample_buf_size; | ||
| unsigned int cnt_samples; /* number of final samples in sample_buf */ | ||
| }; | ||
|
|
||
| SR_PRIV extern const char *ols_channel_names[]; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Maybe commit message could state what non-desired behaviour happened with the old code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly don't remember what happened when we send garbage via sr_session_send (trigger in the future). I guess it is some unrecoverable state, like a crash, otherwise I think I wouldn't have fixed it.