Use const

This commit is contained in:
Jim Colderwood 2024-05-25 16:20:53 +01:00
parent eba5bf0196
commit 302a986fb9

View File

@ -19,11 +19,11 @@ func (f *Frame) Init(buff []byte, n int) error {
return err
}
/* Can't initialize existing frame */
if f.Metadata == 2 {
if f.Metadata == METADATA {
return errors.New("frame is already initialized")
}
f.Metadata = int8(buff[23])
if f.Metadata == 2 {
if f.Metadata == METADATA {
fmt.Println("meta data")
callLen := buff[33]
f.Callsign = string(buff[46 : 46+callLen])