Script to temporarily swap nub mode?


Blue Protoman

Well-Known Member
Joined
Mar 6, 2010
Messages
4,117
So I've gotten most of the FPS's that have been ported to the Pandora. Fine. Problem is, they don't control the way I'm used to. I heard that swapping nub modes works pretty well, but I don't wanna have to do it every time I play Duke Nukem or Quake. Is there a script or .OVR command or something I can use to temporarily swap the nubs (per-game, not every time I run a PND), and have them switch back when I finish?
 
So I've gotten most of the FPS's that have been ported to the Pandora. Fine. Problem is, they don't control the way I'm used to. I heard that swapping nub modes works pretty well, but I don't wanna have to do it every time I play Duke Nukem or Quake. Is there a script or .OVR command or something I can use to temporarily swap the nubs (per-game, not every time I run a PND), and have them switch back when I finish?

You could probably search for the right command here in the forums (I'm sure it's there somewhere) and then put it into the startscript of the pnds for which you want it switched. You should be able to work out yourself how to do this (wiki, forum search,...). ;)
 
As T4b already pointed out, you'll have to modify the startup-script of the PND.


Here is an example which i've used for the "nub-scroll-mode" in my Links2-PND (you'll have to change it to suit your needs, of course):


1) save actual nub-mode and values:



Code:
cat /proc/pandora/nub1/mode > /tmp/nubmode_before_links

cat /proc/pandora/nub1/scrollx_sensitivity > /tmp/scrollx_before_links 

cat /proc/pandora/nub1/scrolly_sensitivity > /tmp/scrolly_before_links

cat /proc/pandora/nub1/scroll_rate > /tmp/scrollrate_before_links

2) set new nub-mode and values:





Code:
echo "scroll" > /proc/pandora/nub1/mode

echo "8" > /proc/pandora/nub1/scrollx_sensitivity

echo "8" > /proc/pandora/nub1/scrolly_sensitivity

echo "20" > /proc/pandora/nub1/scroll_rate

3) start your application/game



4) restore nub-mode and values, clean up:





Code:
cat /tmp/nubmode_before_links > /proc/pandora/nub1/mode 

cat /tmp/scrollx_before_links > /proc/pandora/nub1/scrollx_sensitivity 

cat /tmp/scrolly_before_links > /proc/pandora/nub1/scrolly_sensitivity 

cat /tmp/scrollrate_before_links > /proc/pandora/nub1/scroll_rate 


rm /tmp/nubmode_before_links /tmp/scrollx_before_links /tmp/scrolly_before_links /tmp/scrollrate_before_links


This should get you going.
 
How can I modify the startup script, then? I understand that any file placed in a PND's respective appdata folder will replace any file in the PND that it shares its name with.
 
if you have sebt3 beta pnd_run.


"- support for user configured pre/post scripts (have to be in the appdata, will not be taken from the pnd. file have to be named PND_pre_script.sh and PND_post_script.sh)"


you can use that. otherwise, well its a pnd by pnd thing (need to extract the run script, copy it in appdata, and edit it to backup/restore your settings).
 
I'll have to try that out at one point. Someone should add this to the Tweaks thread.
 
EDIT: Never mind. If this works, then I'm writing a tutorial of my experiences!


EDIT II: Got it somewhat working; it writes a file to /tmp but I didn't see any effect. I think I know what the issue is, though.
 
Last edited by a moderator:
Did anyone else notice that whenever you write a value to set the scroll sensitivity that the actual value which is set is always one closer to zero than the value written (i.e. 7 becomes 6, -7 becomes -6, etc...)?


Affected files:


/proc/pandora/nub0/scrollx_sensitivity


/proc/pandora/nub0/scrolly_sensitivity


/proc/pandora/nub1/scrollx_sensitivity


/proc/pandora/nub1/scrolly_sensitivity
 
Back
Top