protocol/aprs: extract comment to frame
This commit is contained in:
@@ -29,6 +29,7 @@ type Frame struct {
|
||||
Longitude float64
|
||||
Altitude float64
|
||||
Symbol string
|
||||
Comment string
|
||||
}
|
||||
|
||||
func Parse(s string) (*Frame, error) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
type Message struct {
|
||||
ID int `json::"id"`
|
||||
ID int `json:"id"`
|
||||
IsAcknowledge bool `json:"is_ack"`
|
||||
IsRejection bool `json:"is_rejection"`
|
||||
IsBulletin bool `json:"is_bulletin"`
|
||||
|
||||
@@ -104,6 +104,7 @@ func (d micEDecoder) Decode(frame *Frame) (data Data, err error) {
|
||||
frame.Longitude = report.Longitude
|
||||
frame.Altitude = report.Altitude
|
||||
frame.Symbol = report.Symbol
|
||||
frame.Comment = report.Comment
|
||||
|
||||
return report, nil
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ func (d positionDecoder) Decode(frame *Frame) (data Data, err error) {
|
||||
frame.Longitude = pos.Longitude
|
||||
frame.Altitude = pos.Altitude
|
||||
frame.Symbol = pos.Symbol
|
||||
frame.Comment = pos.Comment
|
||||
|
||||
return pos, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user