Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Support Shelly 2.5 #1827
Support Shelly 2.5 #1827
Changes from 7 commits
1febe9b
eae8899
4c9ca84
10fdd27
e63c5e1
440a7cd
e873af7
1b49304
e3ea8f1
d460581
9dbaeb3
c20f190
3246390
1c3d68a
f0bcaa1
6f0a39d
104a641
08dadb9
7df5817
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 might as well be static, since we don't use any member access. And we already are inside a class, Ade7953 prefix is redundant.
I was somewhat confused by the sizing function, is this mentioned somewhere in the datasheet?
Kind-of related
If it is really how it works, I tried making it more compact (idk about what is more readable though...)
You can try this with
~/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-gdb
(you'll need start building something withespressif8266@2.2.2
platform first, it will move the old one to a separate dir)At least what it seems like, that the code size goes down 77 bytes.
edit: ...it might also might not matter at all. i will try with full build later. current tests are with
__attribute__((noinline))
an a small test projectThere 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 need to learn more about moving bytes, I'm not really sure what reg_size does, but it seems to be a very important function.
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.
And just to be clear about this, what happens is:
Then, when checking last 2 bits
So, the 0x3... prefix contains 4 bytes => 32 bits and 0x2... contains 3 bytes => 24 bits