• Status Closed
  • Percent Complete
  • Task Type Bugs
  • Category Battery/Charging
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.6
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by saratoga - 2010-11-22
Last edited by saratoga - 2011-05-16

FS#11769 - Change USB charge mode detection key

Mostly for historical reasons, rockbox requires the user to hold down a key to enter charge mode when plugging in USB on a number of targets. Unfortunately, this has several problems on some targets, including:

1) The key is often quite different on different devices, even those with fairly similar layouts, so its often not obvious what to press.

For example, the gigabeat S and sansas all have a center select buttons, and a menu/home type button. On the S, the menu button enters charge mode. On the Sansas, select does it.

2) On some devices, its very difficult to hold the USB charge mode while inserting USB for mechanical reasons.

For example, on the Nano 2G or Sansa Clip, its extremely easy to hit another button while trying to force a USB plug in because the devices are both tiny and very sensitive.

To address the latter, the current code defines a USBPOWER_BTN_IGNORE, which is ignored if its also pressed. However for nearly all targets, the button is defined to something uesless, presumably because its purpose is not commented in the code.

This patch throws all that out. If you click any button while inserting USB, you will get charge mode. Asking on IRC, people seemed in favor of this approach. However, it is possible there are targets out there where this could make it difficult to enter USB mode due to awkward button placement. If so, this patch should be updated to work around that.

I'd appreciate feedback.

Closed by  saratoga
2011-05-16 20:31
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

Accepted in r29889.

fg commented on 2010-11-22 11:31

If this is done, the manual should be updated as well. The attached patch may be a good start.

This task seems to be related to, and possibly a duplicate of,  FS#10198 .

fg commented on 2010-11-22 14:05

sideral: vaguely related, maybe. Duplicate, how?

I think it may be a duplicate because  FS#10198  implements the same functionality: If you click any button while inserting USB, you will get charge mode. ( FS#10198  goes a step beyond that and also allows configuring the opposite behavior: default to charge only, pressing any button forces USB slave mode.)

Updated to leave in the check for button power on the Player and Ondio since these require it when booting from a flashed device. Also, resync manual changes.


Available keyboard shortcuts


Task Details

Task Editing