Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix copy/paste between specials #689

Merged
merged 3 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions chirp/drivers/fake.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ def __init__(self, *a, **k):
super().__init__(*a, **k)
self.settings = {'knob': 5}
self.memories = []
for i in range(1, 11):
for i in range(1, 12):
m = chirp_common.Memory(i, empty=i > 5, name='channel %i' % i)
m.freq = 146520000
self.memories.append(m)
self.memories[-1].extd_number = 'Special'

def get_features(self):
rf = chirp_common.RadioFeatures()
Expand All @@ -31,14 +32,17 @@ def get_features(self):
rf.has_bank = True
rf.valid_name_length = 8
rf.valid_characters = chirp_common.CHARSET_ASCII
rf.valid_special_chans = ['Special']
return rf

def get_memory(self, number):
if number == 'Special':
number = len(self.memories)
return self.memories[number - 1]

def set_memory(self, mem):
LOG.info('Set memory %s' % mem)
self.memories[mem.number - 1] = mem
self.memories[mem.number - 1] = mem.dupe()

def get_settings(self):
g = settings.RadioSettingGroup('top', 'Some Settings')
Expand Down
3 changes: 1 addition & 2 deletions chirp/drivers/ic2820.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ def get_memory(self, number):
mem.skip = "P"
else:
mem.extd_number = util.get_dict_rev(_get_special(), number)
mem.immutable = ["number", "skip", "bank", "bank_index",
"extd_number"]
mem.immutable = ["number", "skip", "extd_number"]

if not is_used:
mem.empty = True
Expand Down
Loading