• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Drivers
  • Assigned To No-one
  • Operating System Sansa e200
  • Severity Low
  • Priority Very Low
  • Reported Version Version 3.2
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by sko - 2009-04-12
Last edited by kugel. - 2009-04-13

FS#10127 - Sansa e200v2: wrapping in menus

This patch makes menus wrap if last/first item is reached. I compared the scrollwheel functions of the fuze and the e200v2 and took the handling of the repeat and wheel_delta variables from the fuze driver and implemented it to the e200v2 driver. I don’t know if all these changes are necessary (i’m no C programmer), but it works fine.

Closed by  kugel.
2009-04-13 14:09
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Committed in r20700. Good job and thanks!

Good Work. I'm wondering if the code can be more cleaned up and be made like the fuze's driver.

PS: We need your full real name if you want this to be committed.

sko commented on 2009-04-12 18:17

Well, I tried to use the whole scrollwheel() function of the fuze driver, but it is not as good as this one on the e200v2. With the function of the fuze driver it is possible that the next menu item is not selected if the wheel is turned very slow, with the one in the e200v2 driver (and your patch  FS#10120 ) its perfect I think: one physical click scrolls one item.

Well, the fuze needs to skip 4 queue_posts while the e200 needs only 2 (see "++count >= 4 &&…." vs "else if (++wheel_click_count < 2)" which is why it skipped items for you. Try changing to ++count >= 2 if you insert the fuze's one.

Ok, I committed  FS#10120 .

Do you have found a way to make it not always wrap, but only if you reach the end/beginning slowly?

sko commented on 2009-04-13 11:12

Is it wrapping on fuze only if it's slow? I wonder if this is driver-related. The menu should only wrap if there is no BUTTON_REPEAT, so can it be related to the keymap?
Anyway, I made it more like the fuze driver… maybe in a different way than you expected: the wheel is working perfectly with the fuze's scrollwheel function if the skip count is 2 instead of 4, so I put the scrollwheel function out of the driver files into a extra file, so both are using the same code (was just an idea to avoid redundancies in the code) .

Right. On the Fuze it only wraps if you turn the wheel slowly (which means there's no BUTTON_REPEAT). And it should work like that on the e200 too (if possible).

Edit: Combining both drivers entirely would also be reasonable. The scrollwheel function is the only real difference.

sko commented on 2009-04-13 13:04

Ok, thanks to kugel here is a patch which wraps only if the wheel is turned slowly. The scrollwheel function is back in the driver file because of the changes. If someone wants to commit: my real name is Dustin Skoracki.


Available keyboard shortcuts


Task Details

Task Editing