Bug #6293

Special channels button clears all memories / Yaesu FT-8900

Added by Kalle Tuulos almost 2 years ago. Updated 9 months ago.

Status:Closed Start date:12/10/2018
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:-
Target version:chirp-daily
Chirp Version:daily Platform:All
Model affected:Yaesu FT-8900

Description

Background: Yeasu FT-8900 memories are imported from radio or loaded from image file. Special Channels button is pressed.

1. What is the behavior you are seeing?
The memory list is cleared and there is no way to restore memories.

2. What is the behavior you were expecting?
I don't know what should be the behaviour, as in Baofeng UV-5R, the Special Channels button doesn't seem to have any effect. At least it should not clear memories.

3. Can you reproduce the problem all the time?
Yes.

4. What are the steps required to reproduce the problem?
Step1: Load image file (attached).
Step2: Press "Special Channels" button.

5. Is this specific to a certain radio model (driver) or something that you can reproduce with another radio?
Seems to occur on Yeasu FT-8900, doesn't occur on Baofeng UV-5R.

kalle_Yaesu_FT-8900_20181205.img (14.6 kB) Kalle Tuulos, 12/10/2018 11:22 pm

Associated revisions

Revision 3011:d9207cbb323d
Added by Kalle Tuulos almost 2 years ago

[FT8900] Deleted inherited get_bank_model function, fixes #6293

The FT-8900 inherits its class from FT-8800, which defines also the
get_bank_model function. The existence of this function is checked
in order to decide, whether Banks tab is shown or not. As banks are
not supported in FT-8900, the banks tab must not be shown.

Revision 3014:d8febd6e81ee
Added by Dan Smith almost 2 years ago

Fix Yaesu FT-8900 bank model disable

This reverts/fixes a previous patch that tried to delete the get_bank_model()
method from a class to avoid loading the banks tab for the 8900, which does
not support them. This fails the static analysis checker at least, and isn't
really the right way to do it. Just returning None will cause the compat routine
in chirp_common to do the right thing, so this patch changes it to just do
that.

Re-fix for #6293

History

Updated by Kalle Tuulos almost 2 years ago

After fiddling more with this, the "Special Channels" button seems to work sometimes. When it doesn't work, it shows status "[0] Getting Bank information for memory 2" on the bottom of the display and following text is printed on the debug (running in Linux, the Mercurial snapshot version, chirpw executed from command line):

---8<---8<---
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in bootstrap_inner
self.run()
File "/home/ktuulos/dev/chirp.hg/chirp/ui/common.py", line 261, in run
job.execute(self.radio)
File "/home/ktuulos/dev/chirp.hg/chirp/ui/bankedit.py", line 138, in execute
mappings = self.__model.get_memory_mappings(mem)
File "/home/ktuulos/dev/chirp.hg/chirp/drivers/ft7800.py", line 519, in get_memory_mappings
self.__precache()
File "/home/ktuulos/dev/chirp.hg/chirp/drivers/ft7800.py", line 461, in _precache
self.
_b2m_cache[bank.index] = self._get_bank_memories(bank)
File "/home/ktuulos/dev/chirp.hg/chirp/drivers/ft7800.py", line 504, in _get_bank_memories
c = self._radio._memobj.bank_channels[bank.index]
File "/home/ktuulos/dev/chirp.hg/chirp/bitwise.py", line 688, in __getattr

raise AttributeError("No attribute %s in struct" % name)
AttributeError: No attribute bank_channels in struct
---8<---8<---

Updated by Kalle Tuulos almost 2 years ago

And one more update. The error requires, that the "Banks" page is visited before pressing Special Channels button. The traceback is given from Banks page selection.

So, the updated steps to reproduce the problem is:
Step1: Open Chirpw from command line or from Windows menu
Step2: Open image file (attached)
Step3: Select Banks page.
--> the traceback is given
Step4: Select Memories page.
--> memories are still visible.
Step5: Press "Special Channels" button.
--> memories disappear

Updated by Kalle Tuulos almost 2 years ago

I studied the ft7800.py file, where FT-8900 memory is defined. The problem is, that MEM_FORMAT8900 does not have "bank_channels" definition.

MEM_FORMAT_8900 = """
#seekto 0x0708;
struct {
u8 used:1,
skip:2,
sub_used:1,
unknown2:1,
duplex:3;
bbcd freq3;
u8 mode:2,
nameused:1,
unknown4:1,
power:2,
tmode:2;
bbcd split3;
u8 unknown5:2,
tone:6;
u8 namevalid:1,
dtcs:7;
u8 name6;
} memory799;

#seekto 0x51C8;
struct {
u8 skip0:2,
skip1:2,
skip2:2,
skip3:2;
} flags400;

#seekto 0x7B48;
u8 checksum;
"""

Updated by Kalle Tuulos almost 2 years ago

The correction for this problem is in the following diff output:

diff -r 62b4cbefa867 chirp/drivers/ft7800.py
--- a/chirp/drivers/ft7800.py    Mon Dec 03 08:31:11 2018 -0800
+++ b/chirp/drivers/ft7800.py    Tue Dec 11 22:54:42 2018 +0200
@@ -977,6 +977,8 @@

     MODES = ["FM", "NFM", "AM"]

+    del FT8800Radio.get_bank_model
+
     def process_mmap(self):
         self._memobj = bitwise.parse(MEM_FORMAT_8900, self._mmap)

I'll send this patch to the mailing list.

Updated by Bernhard Hailer 9 months ago

  • Subject changed from Special channels button clears all memories / Yeasu FT-8900 to Special channels button clears all memories / Yaesu FT-8900
  • Status changed from New to Closed
  • Target version set to chirp-daily
  • % Done changed from 0 to 100
  • Model affected changed from (All models) to Yaesu FT-8900

It appears that this has been fixed.

Also available in: Atom PDF

prevent spam