mirror of
https://github.com/nonoo/kappanhang.git
synced 2026-01-06 16:59:58 +01:00
Do not read S/OVF while transmitting
This commit is contained in:
parent
aca26b053a
commit
e87093e69c
|
|
@ -1302,15 +1302,17 @@ func (s *civControlStruct) loop() {
|
|||
s.deinitFinished <- true
|
||||
return
|
||||
case <-time.After(statusPollInterval):
|
||||
if !s.state.getS.pending && time.Since(s.state.lastSReceivedAt) >= statusPollInterval {
|
||||
_ = s.getS()
|
||||
}
|
||||
if !s.state.getOVF.pending && time.Since(s.state.lastOVFReceivedAt) >= statusPollInterval {
|
||||
_ = s.getOVF()
|
||||
}
|
||||
if !s.state.getSWR.pending && time.Since(s.state.lastSWRReceivedAt) >= statusPollInterval &&
|
||||
(s.state.ptt || s.state.tune) {
|
||||
_ = s.getSWR()
|
||||
if s.state.ptt || s.state.tune {
|
||||
if !s.state.getSWR.pending && time.Since(s.state.lastSWRReceivedAt) >= statusPollInterval {
|
||||
_ = s.getSWR()
|
||||
}
|
||||
} else {
|
||||
if !s.state.getS.pending && time.Since(s.state.lastSReceivedAt) >= statusPollInterval {
|
||||
_ = s.getS()
|
||||
}
|
||||
if !s.state.getOVF.pending && time.Since(s.state.lastOVFReceivedAt) >= statusPollInterval {
|
||||
_ = s.getOVF()
|
||||
}
|
||||
}
|
||||
case <-s.resetSReadTimer:
|
||||
case <-s.newPendingCmdAdded:
|
||||
|
|
|
|||
Loading…
Reference in a new issue