Bug #8745

Icom IC-9x driver throws exception when a memory does not have a bank attribute

Added by Jonathan Woytek 3 months ago. Updated about 1 month ago.

Status:New Start date:01/27/2021
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:chirp-daily
Chirp Version:daily Platform:MacOS
Model affected:Icom IC-91AD

Description

When reading channels from an IC-91AD, in ic9x.py line 142 (today's daily), the memory type was initialized as chirp_common.Memory(). This object does not have a _bank attribute. For reasons I don't fully parse yet, the last memory in both bank A and B would throw an exception when the program went to retrieve the _bank attribute. Wrapping the call to retrieve _bank on line 83 with a try/catch(AttributeError) so that it returns None when the _bank attribute is missing is one fix. While digging into that, I found the memory type initialization on line 142. Changing that initialization to use ic9x_ll.IC9xMemory eliminates the missing _bank attribute.

Not knowing which way might be the project's preferred way to handle this, I'm attaching my modified ic9x.py with both modifications.

Additionally, the IC-91AD band B has 450 memory locations, according to the documentation. The existing ic9x.py defined the maximum on band B as 400 channels. The band limits and other special channels get stored in these higher locations. I also updated the upper limit for band B to 449 to cover the 450 memory locations.

ic9x.py - patched ic9x.py (12.9 kB) Jonathan Woytek, 01/27/2021 05:33 pm

History

Updated by Bernhard Hailer about 1 month ago

  • Model affected changed from IC-91AD to Icom IC-91AD

Hello Jonathan, thanks for engaging! Sorry for the delay. I suggest that you read the Wiki article Developers, create a diff, and share it on the developers mailing list. Just posting it here won't move anything; there's an acceptance process for patches which needs to pass. Good luck!

Also available in: Atom PDF