From 302a986fb94c0998341aa381c9e979bd25db8f16 Mon Sep 17 00:00:00 2001 From: Jim Colderwood Date: Sat, 25 May 2024 16:20:53 +0100 Subject: [PATCH] Use const --- usrp/proto.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usrp/proto.go b/usrp/proto.go index c5704d9..7a695c7 100644 --- a/usrp/proto.go +++ b/usrp/proto.go @@ -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])