Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  patch to change the function of the power button?
« previous next »
  • Print
Pages: [1]

Author Topic: patch to change the function of the power button?  (Read 1742 times)

Offline edfardos

  • Member
  • *
  • Posts: 13
patch to change the function of the power button?
« on: February 08, 2014, 12:03:51 PM »
Personally, I'd like to have the power button just wake the lcd so I can see the time of day and play status of my clip+, exactly like the stock firmware.  It currently wakes the lcd, stops playback, then goes into some previous menu all with one click.   Is there a .cfg for the power button behavior?  Short of that, does anyone have a source code diff patch for this? Short of that, anyone know where button functions are implemented in the source?

Pressing the home button twice works most of the time, but I'd like to learn while I'm making rockbox perfect for my personal needs.

thanks!

Edfardos
Logged

Offline edfardos

  • Member
  • *
  • Posts: 13
Re: patch to change the function of the power button?
« Reply #1 on: February 08, 2014, 02:29:14 PM »
ah, it looks like it's in ./apps/keymaps/keymap-clip.c

static const struct button_mapping button_context_wps[]  = {
    { ACTION_WPS_PLAY,     BUTTON_UP|BUTTON_REL,        BUTTON_UP },
    { ACTION_WPS_STOP,     BUTTON_POWER|BUTTON_REL,     BUTTON_POWER },


Just remove BUTTON_POWER, and i should be good to go....

--edfardos
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: patch to change the function of the power button?
« Reply #2 on: February 09, 2014, 05:59:55 AM »
Have you looked at the "First Keypress Enables Backlight Only" setting?
Logged

Offline edfardos

  • Member
  • *
  • Posts: 13
Re: patch to change the function of the power button?
« Reply #3 on: February 09, 2014, 11:23:07 AM »
Yes, it's un predictable when in your pocket, or when you press a button 1ms after the screen goes dark.

I already modified the above source and it works great on the simulator, so I'm all good, just need to get the old ARM compiler for ubuntu 12.04...  something about rockboxdev.sh builds it?

thanks,

edfardos
Logged

Offline edfardos

  • Member
  • *
  • Posts: 13
Re: patch to change the function of the power button?
« Reply #4 on: February 09, 2014, 06:36:57 PM »
Compiled 3.13 with the changes, works perfectly on the device.  The power button simply wakes the screen now.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: patch to change the function of the power button?
« Reply #5 on: February 09, 2014, 07:09:36 PM »
I would probably have recommended using the current source, as 3.13 is a year old now, but at least you got it.
Logged

Offline edfardos

  • Member
  • *
  • Posts: 13
Re: patch to change the function of the power button?
« Reply #6 on: February 13, 2014, 09:57:46 AM »
Yah I considered that but isnt 3.13 more stable?   When I embark on 30 hors of airplanes I want that piece of mind.  Or is the master git branch considered stable by most people?    I kinda miss the debug menu and the volume limit found in the master branch.
Logged

Offline toehser

  • Member
  • *
  • Posts: 107
Re: patch to change the function of the power button?
« Reply #7 on: February 13, 2014, 01:12:48 PM »
3.13 is NOT more stable for some values of "stable".

It is a semantic thing... 3.13 is a known thing that isn't changing, while daily builds, by definition, change every day-

But 3.13 has known bugs that cause known crashes that have been fixed.

So if by "stable" you mean "crashes less", certain daily builds are MORE stable.

What is hard is that WHICH daily builds are "stable" and which ones have "other bugs in progress" is not defined.

I'm running a build from tips of git a week or two ago and it is DEFINITELY better than 3.13.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  patch to change the function of the power button?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.063 seconds with 14 queries.