[chirp_devel] VX2r progress

Andrew Errington
Tue Mar 27 18:40:15 PDT 2012


On Tue, March 27, 2012 23:18, Dan Smith wrote:
>> Hmm.  The main code needs a lot more comments.
>>
>
> Hmm. I disagree :)

Well, as long as you don't mind a bunch of dumb questions from me that's
fine. :)

>> What is 'required_step' and 'fix_rounded_step' in chirp_common?
>>
>
> If you look at the two, required_step() is clearly returning the step
> frequency required to hit the supplied frequency. Some radios do not store
> the entire frequency because the sub-kHz amount can be implied. The
> fix_rounded_step() attempts to determine that implied value and return the
> actual frequency.
>
>> In the VX2r we are allowed a step size of 9, which is not accounted
>> for in these routines.  I have declared it in STEPS in vx2r.py, but this
>> is not used by chirp_common.py or passed as a parameter.  So chirp barfs
>> on 1.458 MHz, which is an AM station in one of my memories.
>
> Yep, as it will for any of the radios. It's just never been something I
> cared about, which is bad and lazy. Feel free to fix :)

Ok.  I'll probably have to.  Also, STEPS is not passed back to the GUI, so
if you edit a channel you can see the default range of steps, not the
actual allowed reange of steps for this radio.

>> Whilst I'm at it, the memory name is limited to 6 characters, which
>> is recorded in  rf.valid_name_length = 6, but then hard-coded in various
>> other places.
>
> Where is that? I use all 16 characters on my VX8 without any trouble.

Sorry, I meant in the radio-specific source.  For example, in set_memory,
the length of the name is hard-coded, and I had to change it to 6.  If it
used a constant from elsewhere, such as rf.valid_name_length then it would
always be consistent.

Also, I'm not happy with the loop that converts the data to the name in
get_memory.  It's possible the loop will never terminate, since there is
no guarantee there will be an 0xFF byte present.  Instead I will make it
loop over rf.valid_name_length bytes (and terminate early if 0xFF is
found).

My next task is to make a whole bunch of memories on the radio that differ
by only one option setting, then dump the data and see what bits have
changed.  Then I can define them and unpack them properly.

73,

A




More information about the chirp_devel mailing list