-
Notifications
You must be signed in to change notification settings - Fork 205
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 radtel rt730 bugs #1058
Fix radtel rt730 bugs #1058
Conversation
@kk7ds Hi Dan. I am having trouble with the 3rd commit. I am trying to add the ability to paste a memory row with a forced AM frequency into a memory row with an existing forced AM frequency based on how it is done in the baofeng_uv17Pro.py driver. What I have doesn't pass the unit tests. I don't get what the errors are trying to tell me. If I comment out the 'elif: section in check_set_memory_immutable_policy() then it passes all tests. So whenever it is convenient for you, I would be grateful if you could take a look at this and help me fix it. Thanks, |
chirp/drivers/tdh8.py
Outdated
@@ -1024,6 +1025,22 @@ class TDH8(chirp_common.CloneModeRadio): | |||
chirp_common.PowerLevel("Mid", watts=4.00), | |||
chirp_common.PowerLevel("High", watts=8.00)] | |||
|
|||
def check_set_memory_immutable_policy(self, existing, new): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be on the base class or can it be only on the RT730 subclass? The failure is because you didn't add it to the whitelist in test_chirp_common
but if we add it on the base class here, we have to add all the subclasses to the whitelist as well, which would be less than ideal, unless it's really required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it should probably be in the RT730 and any other model that supports airband (the TD-H3). I actually had put them there but switched it back to where it is now since I was unable to get it to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so it doesn't work for some reason when put on the RT730 itself? It really should...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess not if it isn't in the whitelist. I will add it to the whitelist. Should I just do it for the RT730 and don't worry about the TD-H3 unless someone complains about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dunno, maybe just do it for the RT730 now so we can get this merged. So you're going to move this to the RT730 subclass and add just that to the whitelist right?
Not sure if it's unclear, but the whitelist only affects the test passing, not the runtime operation...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving to RT730 and adding to whitelist passes the tests.
a8a8948
to
9e815f3
Compare
The driver test was failing before, along with the unit test, so I think something else must be going on. Lemme have a look. |
OK. Thanks. |
So, the test it's failing is actually trying to set a memory that is outside the range supported by the radio, and it's failing on the immutable thing before it has even checked that the frequency is valid for the radio. The error is actually in import_logic and I'm having a hard time understanding how that went unnoticed for so long... |
OK. Just leave a comment letting me know what I need to do, if anything, and I will give it a go tomorrow. |
9e815f3
to
2518269
Compare
This makes import_logic fail early if the frequency is outside the supported range of the destination radio. Otherwise other checks may be run and fail when the radio shouldn't even expect to have to deal with them.
The wrong memory location was referenced for 'usedflags'
Partially filled memory names must be padded with 0x00. 0xFF is only valid when the entire name field is empty (but 0x00 is acceptable as well).
Add support to mark mode as immutable so it doesn't get blocked, and let the radio override it during set.
2518269
to
28f503f
Compare
CHIRP PR Guidelines
The following must be true before PRs can be merged:
Fixes #1234
orRelated to #1234
so that the ticket system links the commit to the issue.tests/images
(except for thin aliases where the driver is sufficiently tested already). All new drivers should setNEEDS_COMPAT_SERIAL=False
and useMemoryMapBytes
. New drivers and radio models will affect the Python3 test matrix. You should regenerate this file withtox -emakesupported
and include it in your commit.six
,future
, etc).