-
Notifications
You must be signed in to change notification settings - Fork 220
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
Add default constructors for NMEA types #19
Comments
A constructor that defaults the sentence_type and blanks the fields would be possible; however, the "talker" is an application specific default. |
having defaults for sentence_type (and manufacturer for proprietary sentences) so that they don't have to be given in the constructor is a good idea. Those fields should possibly be class attributes and not instance attributes anyway. I will look into this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be convenient to have default constructors for the NMEA types. When using pynmea2 for encoding NMEA messages we now have to provide constructor parameters which are already known to the NMEA types itself.
An example of how the default constructor would look like for the HDG type;
The usage would be as followed;
The text was updated successfully, but these errors were encountered: