new: parsing gps GPGGA messages other than just GNGGA (fixes #473)

This commit is contained in:
evilsocket 2019-03-07 10:29:17 +01:00
commit 963840915b
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 24 additions and 8 deletions

View file

@ -73,6 +73,11 @@ func (mm ModuleList) MarshalJSON() ([]byte, error) {
return json.Marshal(mods)
}
type GPS struct {
GNGGA nmea.GNGGA
GPGGA nmea.GPGGA
}
type Session struct {
Options core.Options `json:"options"`
Interface *network.Endpoint `json:"interface"`
@ -85,7 +90,7 @@ type Session struct {
Queue *packets.Queue `json:"packets"`
StartedAt time.Time `json:"started_at"`
Active bool `json:"active"`
GPS nmea.GNGGA `json:"gps"`
GPS GPS `json:"gps"`
Modules ModuleList `json:"modules"`
Input *readline.Instance `json:"-"`