protocol/aprs: extract comment to frame
Some checks failed
Run tests / test (1.25) (push) Failing after 1m36s
Run tests / test (stable) (push) Failing after 1m36s

This commit is contained in:
2026-03-02 22:37:39 +01:00
parent d4a693365d
commit 8f8a97300f
4 changed files with 4 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ type Frame struct {
Longitude float64
Altitude float64
Symbol string
Comment string
}
func Parse(s string) (*Frame, error) {

View File

@@ -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"`

View File

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

View File

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