Rockbox Development > New Ports

Cowon D2

<< < (61/194) > >>

shotofadds:
As I understand it, the Rockbox UI already averages the battery measurements. So there's no need to do that inside the driver.

I have no particular opinion on which battery-reading method is best: we could use either of the two values from the PCF, or adc_read(1). I just used the simplest to work out, as I don't think it's too critical at the moment.

Maybe we should do some more tests....

JdGordon:
hey,
So I've started fiddling with the touchpad on the mr500 and have started working on the touchscreen button keymap. I've split the screen up into a 3x3 grid so we have 9 buttons (I've been told the D2 should be big enough to do the same).

attached is the patch which is mostly mr500 specifc but hopefully shows how I tihnk the touchpads should work...

there is a function set_touchpad_mode() which lets screens change between stylus and button mode. in button mode the regular leymap files will be used. in stylus mode the screen will have to figure out what the user pressed....

for the keymaps would it make sense to use one file for both touchpad targets, although it looks like we will have to add a bit of #ifdeffing for the 2 targets because the mr500 only has one real button while the d2 has 4 (the remote keymap for the mr500 will stay in a seperate file to make it a bit cleaner)?

as for the mappings themselves... this is what I have so far (and from my 30s of testing it seems to work)
up/down is top and bottom center. select is middle. cancel is bottom right, menu is top left, contect menu is hold select


edit: attachment updated to include sim fixes... the numpad buttons are used for the 9 touchpad buttons (D2 sim probably wont ocmpile with this change though....) and the sim will convert mouse -> button depending on the touchpad mode like the target should.

shotofadds:
Yep, the D2 screen should be big enough for 9 'button' areas, assuming you don't have MASSIVE fingers. ;D

I'm not sure if combining the keymap files is a good idea - for example it should also be possible to use the D2's physical buttons to navigate menus and operate basic screens. IMHO that could lead to a huge mess of #ifdef's if and when any more touchscreen targets come along.

I think all screens (& plugins) should default to 'button' mode unless they explicitly ask for 'touch point' mode, so I'm not sure there's any need for a setting in the menus.

I'll try to concoct a D2 touchscreen driver to work with this patch over the next few days. I'm having some trouble with interrupts from the PCF chip at the moment (it all stops working after ~30 seconds) so I might need to do some creative thinking first...

ps. (minor niggle) doesn't Rockbox generally use UK English? BUTTON_CENTER grates slightly here. ;)

JdGordon:
well, the D2 only has 4 real buttons right? and the mr500 only has 1, so I dont think the extra ifdefs would be such a big problem (certainly less painful than keeping the touchpad keymaps in sync, which they should be).

yeah, screens should default to setting the button mode unless they are specifically set up for stylus mode.
The lists though could do with a setting to choose which mode (seen as both work now), and the wps would also need a setting (I have an idea how to do stylus mode there, and there is a patch somewhere, but its being held out of svn untill one of the targets gets playback going).

as for CENTER/RE, yes, I couldnt remember which is which... I prefer UK english also, I'll change it.

Llorean:
Possibly "Touchmaps" should be kept separate from "Keymaps" in some way, so the touchscreen can be kept in sync, but the buttons can be handled independently?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version