-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/getset bits #211
Feature/getset bits #211
Conversation
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.
Please remove the ema filter from this PR. Also one litttle thing to change (It was broken before your PR, see comment).
middleware/include/c_utils.h
Outdated
#define NER_SET_BIT(num, bit) \ | ||
bit < (sizeof(num) * 8) ? (num |= (1UL << bit)) : num | ||
|
||
#endif /* C_UTILS */ |
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.
put endif at the end of the file
middleware/simple_ema.c
Outdated
#include <stdio.h> | ||
|
||
// Exponential Moving Average Lowpass Filter | ||
void ema_filter(float current_value, float *previous_ema, float alpha) |
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.
this should only appear in ur other PR.
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.
lgtm:)
Changes
Added macros for setting and getting bits of various types
Notes
If setting a bit results in an overflow (bit position is higher than available indices in given number), will just return number instead
Test Cases
Following test cases passed:
void test_get_bit() {
}
void test_set_bit() {
}
To Do
Any remaining things that need to get done
Checklist
It can be helpful to check the
Checks
andFiles changed
tabs.Please reach out to your Project Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.
Closes #200