Skip to content

Commit

Permalink
tdh3: Fix VFO power level settings
Browse files Browse the repository at this point in the history
Same treatment as the memory channels, but for the VFOs.

Fixes #11471
  • Loading branch information
kk7ds committed Aug 13, 2024
1 parent cd22bf0 commit 318c4ca
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions chirp/drivers/tdh8.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,14 +741,12 @@

# AB CHANNEL
A_OFFSET = ["Off", "-", "+"]
A_TX_POWER = ["Low", "Mid", "High"]
A_BAND = ["Wide", "Narrow"]
A_BUSYLOCK = ["Off", "On"]
A_SPEC_QTDQT = ["Off", "On"]
A_WORKMODE = ["VFO", "VFO+CH", "CH Mode"]

B_OFFSET = ["Off", "-", "+"]
B_TX_POWER = ["Low", "Mid", "High"]
B_BAND = ["Wide", "Narrow"]
B_BUSYLOCK = ["Off", "On"]
B_SPEC_QTDQT = ["Off", "On"]
Expand Down Expand Up @@ -1719,9 +1717,15 @@ def _filter(name):
A_OFFSET, A_OFFSET[_vfoa.offset]))
abblock.append(rs)

try:
self._tx_power[_vfoa.lowpower]
cur_a_power = _vfoa.lowpower
except IndexError:
cur_a_power = 0
rs = RadioSetting("lowpower", "A TX Power",
RadioSettingValueList(
A_TX_POWER, A_TX_POWER[_vfoa.lowpower]))
[str(x) for x in self._tx_power],
str(self._tx_power[cur_a_power])))
abblock.append(rs)

rs = RadioSetting("wide", "A Band",
Expand Down Expand Up @@ -1781,9 +1785,15 @@ def _filter(name):
B_OFFSET, B_OFFSET[_vfob.offsetb]))
abblock.append(rs)

try:
self._tx_power[_vfob.lowpowerb]
cur_b_power = _vfob.lowpowerb
except IndexError:
cur_b_power = 0
rs = RadioSetting("lowpowerb", "B TX Power",
RadioSettingValueList(
B_TX_POWER, B_TX_POWER[_vfob.lowpowerb]))
[str(x) for x in self._tx_power],
str(self._tx_power[cur_b_power])))
abblock.append(rs)

rs = RadioSetting("wideb", "B Band",
Expand Down

0 comments on commit 318c4ca

Please sign in to comment.