PDA

View Full Version : axis button commands question



madrebel
14th December 2009, 06:39 AM
Ok, so this is what i have.

CMS.B1 = [JS2.A3 < 2]; //enable/disable wep
CMS.B2 = [JS2.A3 > 253]; //drop flaps at chopped throttle
CMS.B3 = [JS2.A3 > 77]; //down shift rpms at cont 1.0 upshift below 77

it works fine but i would like to expand it to something like this.

down shift rpms at 77 but not before 77. dont upshift until > 55 but dont downshift till 77.

basically i want a zone where i have some throttle to play with in each of the rpm settings. can't quite figure out how to do it.

Bob Church
14th December 2009, 11:35 AM
Hi madrebel,

I think this does what you want. I can't tell for sure if you want to actually shift or just enable the shift so I put in a couple of sequences as place holders to try the logic. Current, cms.b1 turns on at Upshift time for about half a second, cms.b2 turns on at downshift time.


script

// Set flags for > 77 and < 55
//
b1 = [ js2.a3 < 55 ]; // Upshift at 55
b2 = [ js2.a3 > 77 ]; // Downshift at 77

// Upshift sequence goes here
//
sequence
wait( b1 AND NOT b3 );
cms.b1 = TRUE;
delay( 10 );
cms.b1 = FALSE;
endSequence

// Downshift sequence goes her
//
sequence
wait( b2 AND NOT b4 );
cms.b2 = TRUE;
delay( 10 );
cms.b2 = FALSE;
endSequence

// Save the current state for next time
//
b3 = b1; // Remember the incoming
b4 = b2; // states from the last

endScript

If you need an enable rather than the actual shift, it takes a little more logic, you have to set a bit when it enters the upshift or downshift regions, then clear it again when you leave, so UpShift would have to would need to set b6 when it got below 55 and then clear b6 when it got above 55. As it is the sequence are just positioned to send an upshift at 55 and a downshift at 77.

Let me know if you had something else in mind.

Best regards

- Bob

The StickWorks
http://www.stickworks.com

madrebel
14th December 2009, 02:57 PM
nice, works a treat. i need to play with the shift points a bit to get the right amount of throttle i want per settign but works exactly like it should thank for the help :).