~alexandre-hardy/linuxjoymap/linuxjoymap

« back to all changes in this revision

Viewing changes to doc/code/cargame.code

  • Committer: Alexandre Hardy
  • Date: 2009-07-17 09:20:57 UTC
  • Revision ID: ah@zenwalk-20090717092057-oxa4o16isawqa7ue
Initial creation of project

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
     var val; 
 
2
     #get a positive value for acceleration
 
3
     # >128 indicates acceleration
 
4
     val=js2.a[1]/2+128;     
 
5
     #produce a braking value
 
6
     # <128 indicates brakes
 
7
     # we need to reverse the sense of the axis
 
8
     val-=js2.a[0]/2;     
 
9
     a[0]=val;
 
10
     #note that accelerating and braking at 
 
11
     # the same time results in no action
 
12
     # but cannot be resolved here
 
13