Discussion:
[Bitpim-devel] image index
Roger Binns
2003-03-11 07:32:27 UTC
Permalink
I have been investigating an issue with the phone. Quite simply,
try deleting a wallpaper on the phone. The other entries will
do wierd things (display truncated names), display the filename
of the file, but just white etc.

Can anyone figure out what the contents of the index file should
be so that the phone deletes things correctly (it always deletes
the image file fine, and appears to update the index correctly
but then behaves badly).

So far I have tried the following:

- Sorting index entries numerically and/or alphapbetically
- Not deleting files I am overwriting
- Ensuring entries are contiguous
- Forcing starting at zero and working up
- Starting at one and working up

I've double checked that the index contents are identical to
what mapedit generates.

I'm coming to the conclusion that this is a bug in the phone.

Roger
Patrick Tullmann
2003-03-11 17:02:40 UTC
Permalink
Post by Roger Binns
- Sorting index entries numerically and/or alphapbetically
- Not deleting files I am overwriting
- Ensuring entries are contiguous
- Forcing starting at zero and working up
- Starting at one and working up
Can you leave some sort of "null" entry in the deleted spot? If other
parts of the phone refer to images by entry number, that seems the
only correct choice...

BTW, I grabbed the CVS snapshot and had to fetch the latest wxpython
(the version that's part of Debian testing doesn't support all the
features you're using). Just an FYI for the readme.

Also, a couple of the button graphics seem to be missing from the CVS
repository. (They just show up as "?" onscreen.)

I wasn't going to bother buying a data cable since I don't have Win
XP/2K... but bitpim lets me play with it under Linux! Sweet! Got to
get to Radio Shack... Thanks! :)

-Pat

----- ----- ---- --- --- -- - - - - -
Pat Tullmann ***@flux.utah.edu
That which does not kill you just didn't try hard enough.
Roger Binns
2003-03-11 17:28:17 UTC
Permalink
Post by Patrick Tullmann
Post by Roger Binns
- Sorting index entries numerically and/or alphapbetically
- Not deleting files I am overwriting
- Ensuring entries are contiguous
- Forcing starting at zero and working up
- Starting at one and working up
I have now also tried:

- the index is actually how many characters of the name to display
- the index needs to be in the same order that the files are on the
filesystem

I think I am just going to add a menu entry 'Reindex' that goes and
rebuilds the index on the phone. (My developer prototype before
bitpim had this 'feature').
Post by Patrick Tullmann
Can you leave some sort of "null" entry in the deleted spot? If other
parts of the phone refer to images by entry number, that seems the
only correct choice...
The problem is that the phone is the one doing the deletion! It does
enter a null entry. It then also gets confused and displays bad things
when selecting the wallpapers. To be honest this is more of a cosmetic
issue than anything else.

If you want to see what I am talking about, do the following steps:

- Use filesystem view to look at dloadindex/brewImageIndex.map
(the record format is pretty obvious)
- Use bitpim to download a few wallpapers
- Check out the index again to see what bitpim wrote
- Go into the phone menus and select wallpapers, and delete one
or two
- Note how when you are browsing wallpaper it may show ones that
you have already deleted. Also on the selection screen
(Menu -> 8 -> 2 -> 3) move up and down. See how it displays
junk at the bottom
- Use filesystem view to see what it has done to the index again

I am pretty much convinced that this is a plain old bug in the
phone.
Post by Patrick Tullmann
BTW, I grabbed the CVS snapshot and had to fetch the latest wxpython
(the version that's part of Debian testing doesn't support all the
features you're using). Just an FYI for the readme.
I'll probably do a seperate developer readme/pages at some point.
wxpython 2.3 and 2.4 work for me. Are Debian REALLY behind on wxpython?
Post by Patrick Tullmann
Also, a couple of the button graphics seem to be missing from the CVS
repository. (They just show up as "?" onscreen.)
That is correct. Look in the terminal where you start bitpim. It has
lovely reminders of the files that need to be created. (The code falls
back on the question mark when it can't find the desired graphic).
And just to make life a little more fun, on Windows they need to be
16x16 and on Linux it is 32x32. I think I will just have them all
as 32x32 on disk and then scale them when reading them in.
Post by Patrick Tullmann
I wasn't going to bother buying a data cable since I don't have Win
XP/2K...
bitpim works fine under Windows 98 as well.
Post by Patrick Tullmann
but bitpim lets me play with it under Linux! Sweet! Got to
get to Radio Shack... Thanks! :)
I aim to please :-) Once you have it working, and if you have a little
time to spare, I would like some code that detects which ports are
available on Linux.

I use Redhat 8.0 and the cable shows up as /dev/usb/ttyUSB0. RH doesn't
use devfs so it is really hard to tell what is actually connected. I
was thinking of parsinng the dmesg stuff to figure out something pretty
to display to the user!

Roger
Patrick Tullmann
2003-03-12 05:27:15 UTC
Permalink
Post by Roger Binns
Post by Patrick Tullmann
BTW, I grabbed the CVS snapshot and had to fetch the latest wxpython
(the version that's part of Debian testing doesn't support all the
features you're using). Just an FYI for the readme.
I'll probably do a seperate developer readme/pages at some point.
wxpython 2.3 and 2.4 work for me. Are Debian REALLY behind on
wxpython?
Yep. wxpython 2.2 is the version available in Debian testing
(unstable has 2.3 and 2.4 in it). Dunno if the holdup is some
dependency or a slow maintainer...

For the archive, if others need to upgrade wxpython getting and
installing the source wasn't difficult. It even includes the
wxWindows distro and is generally nicely put together:
http://prdownloads.sourceforge.net/wxpython/wxPythonSrc-2.4.0.4.tar.gz
Post by Roger Binns
Post by Patrick Tullmann
Also, a couple of the button graphics seem to be missing from the
CVS repository. (They just show up as "?" onscreen.)
That is correct.
Ah, a todo item then...
Post by Roger Binns
I use Redhat 8.0 and the cable shows up as /dev/usb/ttyUSB0. RH doesn't
use devfs so it is really hard to tell what is actually connected. I
was thinking of parsinng the dmesg stuff to figure out something pretty
to display to the user!
On my box its probably going to show up as /dev/ttyUSB1 (no
intervening 'usb'). Amusingly it will probably show up in a different
place depending on if my USB Visor is plugged in or not....

I should probably wait until I actually get a cable before making
pronouncements, though. :)

-Pat

----- ----- ---- --- --- -- - - - - -
Pat Tullmann ***@cs.utah.edu
"Forty-Two." -- Deep Thought
Roger Binns
2003-03-12 06:54:49 UTC
Permalink
Post by Patrick Tullmann
Yep. wxpython 2.2 is the version available in Debian testing
You can't even get that version anymore from the main download
page on the wxPython site!

Roger

Loading...