mirror of
https://github.com/nonoo/kappanhang.git
synced 2026-04-04 22:17:33 +00:00
Add displaying PTT/freq/mode info to the status bar
This commit is contained in:
parent
9957abbb46
commit
dfb5dbd948
10 changed files with 266 additions and 35 deletions
|
|
@ -19,6 +19,7 @@ type serialStream struct {
|
|||
|
||||
receivedSerialData bool
|
||||
lastReceivedSeq uint16
|
||||
civDecoder civDecoderStruct
|
||||
|
||||
readFromSerialPort struct {
|
||||
buf bytes.Buffer
|
||||
|
|
@ -92,6 +93,8 @@ func (s *serialStream) handleRxSeqBufEntry(e seqBufEntry) {
|
|||
|
||||
e.data = e.data[21:]
|
||||
|
||||
s.civDecoder.decode(e.data)
|
||||
|
||||
if serialPort.write != nil {
|
||||
serialPort.write <- e.data
|
||||
}
|
||||
|
|
@ -250,6 +253,10 @@ func (s *serialStream) init(devName string) error {
|
|||
s.readFromSerialPort.frameTimeout = time.NewTimer(0)
|
||||
<-s.readFromSerialPort.frameTimeout.C
|
||||
|
||||
if err := s.civDecoder.query(s); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
go s.loop()
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue