Rockbox

  • Status New
  • Percent Complete
    0%
  • Task Type Patches
  • Category Battery/Charging
  • Assigned To No-one
  • Operating System All players
  • 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 Jonathan Gordon - 2009-05-11

FS#10198 - USB charge only setting

this patch adds a setting to choose what to do on a usb connection. default is to connect. options are charge only or connect..

holding *any* button will swap the outcome…

it works, but not perfectly… and the manual patch needs to be checked

Thomas Martitz commented on 2009-05-11 01:17

I proposed this a long time ago, and it was almost immediately reject as "configurable buttons are NODO".

Tomer Shalev commented on 2009-05-11 04:07
holding *any* button will swap the outcome…

I am currently working on HID class driver, which will use other buttons while connected, e.g. Volume control (of the host machine), aka multimedia keyboard.
I prefer keeping the 'single button to go out' for now.

Jonathan Gordon commented on 2009-05-11 05:54

we can only have one class driver runnnig at a time right? I think the best option is having one option for each driver and charge, and an "ask" option… possibly with a timeout

Admin
Frank Gevaerts commented on 2009-05-11 09:55

You can have multiple class drivers at the same time

Jonathan Gordon commented on 2009-05-12 01:17

synced and working…. needs some testing though

Paul Louden commented on 2009-05-12 01:20

@Tomer - This isn't about a button going out of USB mode. This is about a button being held *before* the connection preventing it. Since your buttons only occur during USB mode, and this button stops being relevant the instant USB mode starts, it shouldn't be a conflict.

@Kugel - This isn't a configurable button thing. You don't pick which button does anything.

Thomas Martitz commented on 2009-05-12 07:07

That's how I argued too!

I don't mind, as time passes, opinions change.

Steve Bavin commented on 2009-05-12 09:40

Hi JD,

Thanks for this. - I've been hoping to do a similar patch for about a year now.

The sim build fails though:
LD rockboxui.exe
/home/Steve/rockbox/buildsim/apps/settings_list.o: In function `get_settings_list':
/home/Steve/rockbox/apps/settings_list.c:1486: undefined reference to `_usb_set_charge_setting'

I guess that settings_list.c (etc.) should only worry about usb_charging and usb_charge_only if HAVE_USB_POWER is defined.

Jonathan Gordon commented on 2009-05-12 15:26

woops, yeah forgot that #ifdef, ill fix that tonight

Jonathan Gordon commented on 2009-05-31 17:43
Admin
Frank Gevaerts commented on 2009-05-31 19:17

One reason for having only a single button to switch mode is that it's possible to select a harmless button. Telling people that any button works may have the effect that people do weird things like starting a recording while trying to avoid USB storage.
Personally I like the idea of having any button work, but I'm a bit nervous about doing this in general

Jonathan Gordon commented on 2009-05-31 20:19

yes, but people will learn not to press buttons which cause wierd stuff to happen…

sideral commented on 2010-11-15 15:16

I love this feature.

A couple of things that could be added:
* An option to ask the user which USB mode is intended (connect vs charge-only)
* Translations

Your latest patch doesn't apply cleanly any more, I'm afraid. I've attached my adapted version of the patch.

Martin commented on 2011-01-25 09:59

Would it be possible to add a third option "connect only"?

I don't want to trigger recharging whenever I quickly add some files to my device. Allthough modern Li-ion batteries won't suffer from memory effects, it is still beneficial to completely unload them from time to time (~50 cycles) before recharging.

dash commented on 2013-09-07 17:17

Yep, the "connect only" option sounds good.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing