View Single Post
Posts: 1,100 | Thanked: 2,797 times | Joined on Apr 2011 @ Netherlands
#116
Originally Posted by ade View Post
Pali,

Would it be possible to display the current USB mode right under the "USB mode" text as secondary text in the status menu?
Just like "USB connected" shows "charging only" as secondary text when charging and not in Mass storage mode.
It would then have to display "USB periphal mode" when not in host mode.
I'm afraid I will have to do it myself then...

So I created a patch for this to achieve. It is a small change, also using some of your own code.

The status menu item checks the current USB mode at startup and on close of the started applet. It will add "Peripheral mode", "Host with boost" or "Host with charging" beneath "USB mode".

Next to usbmode-status-menu-item.c, I modified yesterdays updated version of usbmode.sh, so it will not display the current mode in a banner. If I would leave it this way, it would show the banner on startup and after the closing of the applet. That would be a bit too much, especially when the USB status can be checked in the status menu.

I hope you will consider implementing it. And as you are a far more skilled C programmer, please see this as a rough proposal in that case.
Attached Images
 
Attached Files
File Type: txt usbmode-status-menu-item.c.patch.txt (2.8 KB, 91 views)
File Type: txt usbmode.sh.patch.txt (537 Bytes, 87 views)
 

The Following 7 Users Say Thank You to ade For This Useful Post: