-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
pqm: add event channels #2360
base: main
Are you sure you want to change the base?
pqm: add event channels #2360
Conversation
a90f8ca
to
cc17fbe
Compare
cc17fbe
to
0f4b02b
Compare
Added new event channels to capture Swells, Dips, RVCs and Intrpts. Updated IIO and project README accordingly. Signed-off-by: Robert Budai <[email protected]>
0f4b02b
to
9b9b3b3
Compare
|
||
struct iio_attribute event_pqm_swell_attribute[] = { | ||
{ | ||
.name = "countEvent", |
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 think you can put the first 4 common attributes in a define, and reuse that common define in each event attribute initialization
return (strlen(buf)); | ||
case CHAN_EVENT_END_TIME: | ||
strcpy(buf, ""); | ||
for (int i = 0; i < MAX_EVENT_NUMBER; i++) { |
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.
So if i understand correctly, for each event type, 6 of them are stored somewhere in pqlib and when the user reads the event channel attributes, they are all being returned, right (together with timestamps and other info) ?
I think this even section needs documenting in readme. Upon reading, do they get reset ? Or does the lib always keep track of the latest 6 events ? I'm curious if there is an "overflow" flag somewhere to know that since the last reading there were events that happened and were missed. I think this is stuff that the user may want to know. Or perhaps there is a documentation of the pqlib somewhere that I am unaware of ?
Pull Request Description
Adding event channels to iio
PR Type
PR Checklist