-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Added support for building for non-AVR boards. #3
Conversation
DISABLED_STATE, | ||
WAITING_STATE, | ||
READING_STATE, | ||
CHECKSUM_STATE, |
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.
Why change these?
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.
Arduino for ESP8266 already defines a macro "DISABLED" that conflicts with
this type definition.
Op 29 mei 2016 11:57 schreef "Matthijs Kooijman" notifications@github.com:
In src/dsmr/reader.h
#3 (comment)
:@@ -218,10 +221,10 @@ class P1Reader {
Stream *stream;
uint8_t req_pin;
enum class State : uint8_t {
DISABLED,
WAITING,
READING,
CHECKSUM,
DISABLED_STATE,
WAITING_STATE,
READING_STATE,
CHECKSUM_STATE,
Why change these?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/matthijskooijman/arduino-dsmr/pull/3/files/27e2ace07f866f0285c58f57b6690c9dfc280bab#r65000969,
or mute the thread
https://github.com/notifications/unsubscribe/AB7KB7I0OqSqrLrpNEAaLqLtKZ_wZIK2ks5qGWMhgaJpZM4Im8LH
.
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.
Ah, right. This should certainly be documented in the commit message, then. Also, perhaps you could file a bug report with the ESP8266 about this, since IMHO it's a bug to define generic macros like these. If they can replace the macro with a global constant with the same value, the compiler can properly apply scoping rules and this will not a problem. We should probably also change this in my library to make things work with current versions (though I don't quite like the extra verbosity of these constant names, but I can't think of any better alternatives right now).
You should probably split the commit message, into a first short summary line (e.g. the first sentence, no dot at the end), an empty line and then the second sentence (being the extended description). This is the common format used with git. |
I also noticed that the crc16.h doesn't have a license associated with it, meaning I can't really include it right now. I've created an issue for this at Paul's repo, I would expect him to find out and fix the license soon. |
@ewasscher, you can just do a force push to the branch to update the commits in this PR, no need to create a new one (which is what I assume you're planning?). If you do, you should probably reopen this PR first. |
OK, next time then. I removed the commits I made to redo them again. Sorry 2016-05-30 19:30 GMT+02:00 Matthijs Kooijman notifications@github.com:
|
Sure, no problem! |
As for the crc16 license, it seems the code was taken from avr-libc, from the comments, so you should probably just include that copyright and license header. |
Note that Paul added a license to his crc16.h file, so you can probably copy that one as it is now: PaulStoffregen/cores@ce5692f |
Fixes for clang-tidy
Added support for building for non-AVR boards. Building was tested for Arduino Due, Arduino Zero and ESP8266 boards.