Rockbox Development > Starting Development and Compiling

Editing controls and Correcting volume number display

(1/1)

invinciblegod:
I currently own a Sansa e200 and I decided that the default controls just arent good for me. So I downloaded the source and am trying to change the controls and compile my own. I got the syntax for the most part but i am confused with these lines:

{ ACTION_WPS_ABRESET,           BUTTON_POWER|BUTTON_UP,      BUTTON_POWER }
{ ACTION_WPS_PITCHSCREEN,   BUTTON_SELECT|BUTTON_UP,      BUTTON_SELECT }
{ ACTION_WPS_ID3SCREEN,     BUTTON_SELECT|BUTTON_DOWN,    BUTTON_SELECT }

As far as I can tell, the part after the "|" should be the state of the button, such as it being held down or released. So what does the BUTTON_POWER|BUTTON_UP mean? Press both buttons at the same time?

I also have no idea what the ABRESET, PITCHSCREEN, and ID3SCREEN are. I dont think I ever encountered these features while actually using ROCKBOX.

Also, where can I find the values for the volume? It always is a range from -74 to 6 in WPS's. I want to see if I cant compensate the variable for it somewhere by adding 74 to the value.

Any help would be greatly appreciated. Thank you.

saratoga:
| is a bitwise OR in c, so BUTTON_POWER|BUTTON_UP gives a variable with bits for both BUTTON_POWER and BUTTON_UP set.

Regarding volume, its in firmware/target/arm/sandisk somewhere in the audio driver I think.  But those values are actually the real volume for the DAC, so I'm not sure changing them makes much sense.

Navigation

[0] Message Index

Go to full version