Open Roel84 opened 10 years ago
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.
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;