Skip to content

Commit

Permalink
Styling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Vazquez committed Nov 14, 2024
1 parent a17e71f commit 3c481f2
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 45 deletions.
98 changes: 53 additions & 45 deletions chirp/drivers/kguv920base.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ def _set_dcs(code, pol):


@directory.register
class KGUV920Radio(chirp_common.CloneModeRadio,
class KGUV920Radio(chirp_common.CloneModeRadio,
chirp_common.ExperimentalRadio):

"""Wouxun KG-UVR5"""
Expand Down Expand Up @@ -692,11 +692,11 @@ def _finish(self):

def _print_memorymap(self, data):

block_size = 8
blockSize = 8
out = ""

blocks = len(data) // block_size
if len(data) % block_size:
blocks = len(data) // blockSize
if len(data) % blockSize:
blocks += 1

for block in range(0, blocks):
Expand Down Expand Up @@ -819,7 +819,7 @@ def get_features(self):
rf.valid_characters = CHARSET
rf.memory_bounds = (1, 999) # 999 memories
return rf

def getUhfMinLimit(self):
pass

Expand All @@ -834,10 +834,10 @@ def getVhfMaxLimit(self):

def getMaxTxOffset(self):
pass

def getMinFreq(self):
pass

def getMaxFreq(self):
pass

Expand Down Expand Up @@ -1082,7 +1082,7 @@ def _get_settings(self):
current_index=_settings.dtmf_interval))
cfg_grp.append(rs)
rs = RadioSetting("mode_pwd", "VFO/MR Password",
RadioSettingValueString(6,6, _pwd_decode(_adv_settings.mode_pwd), True, "1234567890"))
RadioSettingValueString(6, 6, _pwd_decode(_adv_settings.mode_pwd), True, "1234567890"))
cfg_grp.append(rs)

#
Expand Down Expand Up @@ -1355,7 +1355,7 @@ def _get_settings(self):
RadioSettingValueFloat(65.00, 108.00,
val, precision=2))
fmp_grp.append(rs)

#
# Advanced settings
#
Expand All @@ -1364,40 +1364,48 @@ def _get_settings(self):

rs = RadioSetting("vhf_rx_start", "VHF RX Lower Limit (MHz)",
RadioSettingValueInteger(self.getVhfMinLimit(),
self.getVhfMaxLimit(), _limit_decode(_adv_settings.vhf_rx_start)))
self.getVhfMaxLimit(),
_limit_decode(_adv_settings.vhf_rx_start)))

adv_settings_grp.append(rs)
rs = RadioSetting("vhf_rx_stop", "VHF RX Upper Limit (MHz)",
RadioSettingValueInteger(self.getVhfMinLimit(),
self.getVhfMaxLimit(), _limit_decode(_adv_settings.vhf_rx_stop)))
self.getVhfMaxLimit(),
_limit_decode(_adv_settings.vhf_rx_stop)))
adv_settings_grp.append(rs)

rs = RadioSetting("vhf_tx_start", "VHF TX Lower Limit (MHz)",
RadioSettingValueInteger(self.getVhfMinLimit(),
self.getVhfMaxLimit(), _limit_decode(_adv_settings.vhf_tx_start)))
self.getVhfMaxLimit(),
_limit_decode(_adv_settings.vhf_tx_start)))

adv_settings_grp.append(rs)
rs = RadioSetting("vhf_tx_stop", "VHF TX Upper Limit (MHz)",
RadioSettingValueInteger(self.getVhfMinLimit(),
self.getVhfMaxLimit(), _limit_decode(_adv_settings.vhf_tx_stop)))
self.getVhfMaxLimit(),
_limit_decode(_adv_settings.vhf_tx_stop)))
adv_settings_grp.append(rs)

rs = RadioSetting("uhf_rx_start", "UHF RX Lower Limit (MHz)",
RadioSettingValueInteger(self.getUhfMinLimit(),
self.getUhfMaxLimit(), _limit_decode(_adv_settings.uhf_rx_start)))
self.getUhfMaxLimit(),
_limit_decode(_adv_settings.uhf_rx_start)))
adv_settings_grp.append(rs)
rs = RadioSetting("uhf_rx_stop", "UHF RX Upper Limit (MHz)",
RadioSettingValueInteger(self.getUhfMinLimit(),
self.getUhfMaxLimit(), _limit_decode(_adv_settings.uhf_rx_stop)))
self.getUhfMaxLimit(),
_limit_decode(_adv_settings.uhf_rx_stop)))
adv_settings_grp.append(rs)

rs = RadioSetting("uhf_tx_start", "UHF TX Lower Limit (MHz)",
RadioSettingValueInteger(self.getUhfMinLimit(),
self.getUhfMaxLimit(), _limit_decode(_adv_settings.uhf_tx_start)))
self.getUhfMaxLimit(),
_limit_decode(_adv_settings.uhf_tx_start)))
adv_settings_grp.append(rs)
rs = RadioSetting("uhf_tx_stop", "UHF TX Upper Limit (MHz)",
RadioSettingValueInteger(self.getUhfMinLimit(),
self.getUhfMaxLimit(), _limit_decode(_adv_settings.uhf_tx_stop)))
self.getUhfMaxLimit(),
_limit_decode(_adv_settings.uhf_tx_stop)))
adv_settings_grp.append(rs)
rs = RadioSetting("high_pwr_1", "High TX Power 1",
RadioSettingValueInteger(0, 255, int(_adv_settings.high_pwr_1)))
Expand Down Expand Up @@ -1463,88 +1471,88 @@ def _get_settings(self):
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_5)))
adv_settings_grp.append(rs)
rs = RadioSetting("med_1_pwr_6", "Medium 1 TX Power 6",
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_6)))
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_6)))
adv_settings_grp.append(rs)
rs = RadioSetting("med_1_pwr_7", "Medium 1 TX Power 7",
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_7)))
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_7)))
adv_settings_grp.append(rs)
rs = RadioSetting("med_1_pwr_8", "Medium 1 TX Power 8",
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_8)))
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_8)))
adv_settings_grp.append(rs)
rs = RadioSetting("med_1_pwr_9", "Medium 1 TX Power 9",
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_9)))
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_9)))
adv_settings_grp.append(rs)
rs = RadioSetting("med_1_pwr_10", "Medium 1 TX Power 10",
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_10)))
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_10)))
adv_settings_grp.append(rs)
rs = RadioSetting("med_1_pwr_11", "Medium 1 TX Power 11",
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_11)))
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_11)))
adv_settings_grp.append(rs)
rs = RadioSetting("med_1_pwr_12", "Medium 1 TX Power 12",
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_12)))
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_12)))
adv_settings_grp.append(rs)
rs = RadioSetting("med_1_pwr_13", "Medium 1 TX Power 13",
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_13)))
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_13)))
adv_settings_grp.append(rs)
rs = RadioSetting("med_1_pwr_14", "Medium 1 TX Power 14",
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_14)))
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_14)))
adv_settings_grp.append(rs)
rs = RadioSetting("med_1_pwr_15", "Medium 1 TX Power 15",
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_15)))
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_15)))
adv_settings_grp.append(rs)
rs = RadioSetting("med_1_pwr_16", "Medium 1 TX Power 16",
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_16)))
RadioSettingValueInteger(0, 255, int(_adv_settings.med_1_pwr_16)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_1", "Low TX Power 1",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_1)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_1)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_2", "Low TX Power 2",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_2)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_2)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_3", "Low TX Power 3",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_3)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_3)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_4", "Low TX Power 4",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_4)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_4)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_5", "Low TX Power 5",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_5)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_5)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_6", "Low TX Power 6",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_6)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_6)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_7", "Low TX Power 7",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_7)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_7)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_8", "Low TX Power 8",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_8)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_8)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_9", "Low TX Power 9",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_9)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_9)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_10", "Low TX Power 10",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_10)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_10)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_11", "Low TX Power 11",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_11)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_11)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_12", "Low TX Power 12",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_12)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_12)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_13", "Low TX Power 13",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_13)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_13)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_14", "Low TX Power 14",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_14)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_14)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_15", "Low TX Power 15",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_15)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_15)))
adv_settings_grp.append(rs)
rs = RadioSetting("low_pwr_16", "Low TX Power 16",
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_16)))
RadioSettingValueInteger(0, 255, int(_adv_settings.low_pwr_16)))
adv_settings_grp.append(rs)
rs = RadioSetting("power_2_factor", "Medium power 1-2 Factor",
RadioSettingValueInteger(0, 255, int(_adv_settings.power_2_factor)))
RadioSettingValueInteger(0, 255, int(_adv_settings.power_2_factor)))
adv_settings_grp.append(rs)

#
Expand Down
1 change: 1 addition & 0 deletions chirp/drivers/kguv920pa.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from chirp.drivers import kguv920base
from chirp import directory


@directory.register
class KGUV920PARadio(kguv920base.KGUV920Radio):

Expand Down

0 comments on commit 3c481f2

Please sign in to comment.