[chirp_devel] chirp_devel Digest, Vol 20, Issue 13
Drew Vonada-Smith
Wed Jan 2 20:26:54 PST 2013
Hi Dan,
Sorry, no time to learn yet another lang; just need to be as quick as I can
during HF contest season. Getting rid of the HT shortly, but since I like
and use the program, thought I should at least *try* to contribute first.
Tons of IC-V80 users out there.
Here is the *almost* completed driver and image file used as my test
dataset. Please note:
- Tuning steps, tmode enums redefined. Icom seemed to take out the
redundant items.
- New power levels. Same L, M, H, just different power values.
- Icom items for "Reverse Offset" and "TX Inhibit" identified and defined in
structure but I see no UI exposure for them. ICOM does expose them in their
V80 software. Frankly, who cares; seems unimportant to me. Your call, just
FYI; the structure is there.
All seems to work great, *except* skip. I have no idea how skip is supposed
to work. Memory item MEM6 has skip set, but I see no bitwise difference in
the memory values. Is this something that was handled via the banks? Maybe
there is some minimal bank feature to support this and it just isn't
documented? Thoughts?
Let me know what else I can do. To me, this is ready other than skip, but
you should certainly QA my uneducated code changes.
Want to try to get the ID-51A supported?
73,
Drew K3PA
-----Original Message-----
From: chirp_devel-bounces at intrepid.danplanet.com
[mailto:chirp_devel-bounces at intrepid.danplanet.com] On Behalf Of Dan Smith
Sent: January 02, 2013 18:44
To: chirp_devel at intrepid.danplanet.com
Subject: Re: [chirp_devel] chirp_devel Digest, Vol 20, Issue 13
> I really have no idea how to debug past this. No knowing Python or
> this code, all I can do is capture the errors and pass along out.txt.
Okay, maybe there was some misunderstanding about the intentions here.
I thought you were looking to learn enough Python to write the driver
(several people have). If not, this may not be a very realistic endeavor
(but read on).
> I've tried commenting out the majority of the code and still get the
> same errors.
I commented out the majority of the code and it seems to get pretty far.
Attached is an updated copy where I did the following:
- Spotted the rtone and ctone fields in your two memories and moved the
appropriate bits in the structure definition to match
- Guessed about where the dtcs code is stored
- Spotted the "used" bits (which tell us which memories have valid data
in them) and changed the structure definition to match
- Commented out the code that looks for:
- skip and pskip bits
- tuning_step
- mode
- duplex
- power
- dtcs polarity
- tone mode
With the attached code, I'm able to open your .img file and see your first
two memories (frequency, tones, alpha labels, and offsets).
If you right-click on one of the memories and choose "Show Raw Memory" you
can see how chirp has parsed the data into the structure definition. The
"Diff Raw Memories" option is pretty handy for sussing out the differences
between two almost-identical memories (and is how I typically most of my bit
sniffing for these).
At a very minimum, the following needs to be done:
- Finding the tone mode bits (None, Tone, TSQL, DTCS, etc)
- Finding the mode bits (FM and AM presumably?)
- Changing set_memory() to match the changes in the structure as needed
- Removing all the commented-out code that remains after finding this
stuff
- Test/fix uploading to the radio
Ideally we'd also find the remaining bits covered by the commented-out code,
but even if we don't, I think it'd be usable with just the above.
I suppose if you're not interested in attempting any of the code stuff, I
can make those changes if you're willing to sniff out the bits. I normally
won't develop by proxy like this, but the radio appears pretty simplistic,
and it's pretty close to usable right now.
I've attached the updated .py file, and included a diff of the changes I
made below. How would you like to proceed? I sense your frustration with
what I expect is a difference of expectations about what this process would
be, but I appreciate the work you've done so far and I think we're pretty
close to having something worth putting into the tree.
Thanks Drew!
--
Dan Smith
www.danplanet.com
KK7DS
% diff -u chirp/icv80.py.orig chirp/icv80.py
--- chirp/icv80.py.orig 2013-01-02 16:31:14.126653149 -0800
+++ chirp/icv80.py 2013-01-02 16:33:17.178657828 -0800
@@ -22,24 +22,16 @@
ul16 freq;
ul16 offset;
char name[5];
- char junk[2];
u8 unknown2:2,
rtone:6;
u8 unknown3:2,
ctone:6;
u8 unknown4:1,
dtcs:7;
- u8 tuning_step:4,
- narrow:1,
- unknown5:1,
- duplex:2;
- u8 unknown6:1,
- power:2,
- dtcs_polarity:2,
- tmode:3;
+ u8 unknown[4];
} memory[200];
-#seekto 0x12E0;
+#seekto 0x0D10;
u8 used[38];
#seekto 0x1306;
@@ -105,8 +97,8 @@
_mem = self._memobj.memory[number]
_usd = self._memobj.used[byte]
- _skp = self._memobj.skips[byte]
- _psk = self._memobj.pskips[byte]
+ #_skp = self._memobj.skips[byte]
+ #_psk = self._memobj.pskips[byte]
mem = chirp_common.Memory()
mem.number = number
@@ -124,13 +116,13 @@
mem.rtone = chirp_common.TONES[_mem.rtone]
mem.ctone = chirp_common.TONES[_mem.ctone]
mem.dtcs = chirp_common.DTCS_CODES[_mem.dtcs]
- mem.tuning_step = TUNING_STEPS[_mem.tuning_step]
- mem.mode = _mem.narrow and "NFM" or "FM"
- mem.duplex = DUPLEX[_mem.duplex]
- mem.power = POWER_LEVELS[_mem.power]
- mem.dtcs_polarity = DTCS_POLARITY[_mem.dtcs_polarity]
- mem.tmode = TMODES[_mem.tmode]
- mem.skip = (_psk & bit and "P") or (_skp & bit and "S") or ""
+ #mem.tuning_step = TUNING_STEPS[_mem.tuning_step]
+ #mem.mode = _mem.narrow and "NFM" or "FM"
+ #mem.duplex = DUPLEX[_mem.duplex]
+ #mem.power = POWER_LEVELS[_mem.power]
+ #mem.dtcs_polarity = DTCS_POLARITY[_mem.dtcs_polarity]
+ #mem.tmode = TMODES[_mem.tmode]
+ #mem.skip = (_psk & bit and "P") or (_skp & bit and "S") or ""
return mem
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icv80.py
Type: application/octet-stream
Size: 5286 bytes
Desc: not available
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20130102/8ba8f238/attachment-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icv80.img
Type: application/octet-stream
Size: 3712 bytes
Desc: not available
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20130102/8ba8f238/attachment-0001.img
More information about the chirp_devel
mailing list