Project

General

Profile

Actions

Bug #7095

open

memedit shows default mode 'FM' for subdevice which has only 'WFM'

Added by Jaroslav Škarvada over 4 years ago. Updated over 4 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
09/19/2019
Due date:
% Done:

0%

Estimated time:
Chirp Version:
daily
Model affected:
(All models)
Platform:
Windows
Debug Log:
I read the instructions above:

Description

Created device with feature:
rf.valid_modes = ["FM", "WFM", "AM"]

and one subdevice with feature:
rf.valid_modes = ["WFM", "AM"]

Then in the subdevice channel list the empty channels are shown with mode 'FM', not 'WFM'.

I had to workaround it by adding the following to the subdevice get_memory:

    def get_memory(self, number):
        mem = chirp_common.Memory()

       mem.freq = self.freq_icom2chirp(mem_item.freq)
        if is_empty(number):
            mem.empty = True
            mem.mode = "WFM"
        ...
Actions #1

Updated by Jaroslav Škarvada over 4 years ago

I.e. I had to explicitly add:
mem.mode = "WFM"

Actions #2

Updated by Jaroslav Škarvada over 4 years ago

I think it should automatically take the first mode from the features.

Actions #3

Updated by Jaroslav Škarvada over 4 years ago

I.e. the first mode from the rf.valid_modes.

Actions

Also available in: Atom PDF