Fix SWR read

This commit is contained in:
Nonoo 2020-11-04 12:53:18 +01:00
parent ec564f4fd9
commit 461021fbf4
2 changed files with 2 additions and 2 deletions

View file

@ -103,7 +103,7 @@ is up) with the following info:
- `preamp`: PAMP0 means the preamp is off
- `voltage`: Vd voltage, updated when a TX/TUNE is over
- `txpwr`: current transmit power setting in percent
- `swr`: reported SWR, it seems that the Icom IC-705 always reports 0.0
- `swr`: reported SWR
- Third status bar line:
- `up`: how long the audio/serial connection is active

View file

@ -462,7 +462,7 @@ func (s *civControlStruct) decodeVdSWRS(d []byte) bool {
if len(d) < 3 {
return !s.state.getSWRSent
}
statusLog.reportSWR(((float64(int(d[1])<<8) + float64(d[2])) / 0x0241) * 16)
statusLog.reportSWR(((float64(int(d[1])<<8)+float64(d[2]))/0x0120)*2 + 1)
if s.state.getSWRSent {
s.state.getSWRSent = false
return false