Skip to content
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

Closed
wants to merge 0 commits into from

Conversation

ewasscher
Copy link
Contributor

Added support for building for non-AVR boards. Building was tested for Arduino Due, Arduino Zero and ESP8266 boards.

DISABLED_STATE,
WAITING_STATE,
READING_STATE,
CHECKSUM_STATE,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change these?

Copy link
Contributor Author

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
.

Copy link
Owner

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).

@matthijskooijman
Copy link
Owner

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.

@matthijskooijman
Copy link
Owner

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.

@matthijskooijman
Copy link
Owner

@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.

@ewasscher
Copy link
Contributor Author

OK, next time then. I removed the commits I made to redo them again. Sorry
to bother you with what to you probably looks like newbie behaviour.

2016-05-30 19:30 GMT+02:00 Matthijs Kooijman notifications@github.com:

@ewasscher https://github.com/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.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AB7KBxeny4pBX-GxckeJbp--dDyUsFyAks5qGx6ggaJpZM4Im8LH
.

@matthijskooijman
Copy link
Owner

Sure, no problem!

@matthijskooijman
Copy link
Owner

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.

@matthijskooijman
Copy link
Owner

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
https://github.com/PaulStoffregen/cores/blob/ce5692f9ff5bb3d947d434f4c06cff63683495d9/teensy3/util/crc16.h

Pvlerick pushed a commit to Pvlerick/arduino-dsmr-nl-be that referenced this pull request Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants