View Full Version : Applying both toe brakes to...
531_Ghost
03-04-2005, 03:51 PM
Sorry if this has been asked before but the search didn't turn anything on this up so...
On JS4 A1 and A2 (Pro Pedals toe brakes) I have each scripted to apply the left brake and the right brake like this:
Snippit from .cmc...
Apply_Left_Brakes ,
Apply_Right_Brakes .
Here's the simple script I did for that...
CMS.B1 = [JS4.A1 < 180]; // Apply Left Brake
CMS.B2 = [JS4.A1 > 180]; // Release Left Brake
CMS.B3 = [JS4.A2 < 180]; // Apply Right Brake
CMS.B4 = [JS4.A2 > 180]; // Release Right Brake
and that works but, there's another command in the .cmc...
Apply/Release_Brakes b
And the rest of my scripting associated with this .map...
CMS.B5 = [JS3.A6 < 55]; // Landing Gear Down
CMS.B6 = [JS3.A6 < 180]; // Landing Gear Up
CMS.B7 = [JS3.A6 < 55]; // Tailhook Up
CMS.B8 = [JS3.A6 > 180]; // Tailhook Down
CMS.B9 = [JS2.A3 < 55]; // Engage War Emergency Power
CMS.B10 = [JS2.A3 > 60]; // Disengage War Emergency Power
My question: I'd like to script both axis A1 and A2 on JS4 as they are isocronously pressed to act as tho I'm evenly braking with both pedals.
I'm sure there's a way to do this and I've wanted to for quite some time now but just haven't got up to trying it 'til now. Any suggestions/help would be greatly appreciated by many...
:cheers: :cheers: :cheers:
Bob Church
03-04-2005, 10:29 PM
Hi Ghost,
I'm not sure I quite understand what you're asking. The braking part of the script you posted is sending separate signals for brake on and brake off on each axis, but then the CMC entry looks more you'd just want a single signal that went off or on:
cms.b1 = [js1.a1 > 180];
cms.b2 = [js1.a2 > 180];
If the brakes are toggles, which is what the second CMC example looks like, then you'd probably want to leave a little deadzone between off and on, though you could probably do it with Position programming in the GUI itself. Anyway, that might look more like:
timer(PERIOD, d1, 2) = [js1.a1 < 120] OR [js1.a2 > 180];
timer(PERIOD, d2, 2) = [js1.a2 < 120] OR [js1.a2 > 180];
cms.b1 = d1;
cms.b2 = d2;
and then set cms.b1 and cms.b2 to send the toggle command.
I'd think in that situation the brakes would operate together anyway, you're only showing a single brake command, but it shouldn't be difficult to generate combined signals with a little logic.
Is that any help?
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
531_Ghost
04-04-2005, 12:35 AM
Bob, the "sim" is CFS2 and there's an inut for a left brake, right brake and applying both. So I was thinking that I may actually assign an axis to the left brake one to the right and to apply both as both toe brakes are pressed at the same time (isocronously, my 5$ word for the day ;) )
In the the .cmc the commands are:
Apply_Left_Brakes ,
Apply_Right_Brakes .
Apply/Release_Brakes b
I'm sure it can be done I'm still takin' .cms baby steps as you see tho :D
Oh and I made a bit of a dead zone too and it's workin great!
Thanks fer yer help Bob! I really do appreciate it.
:cheers:
Bob Church
04-04-2005, 01:12 AM
Hi Ghost,
Ah. Okay, so you want the right brake character if that's all you're pressing. Likewise the left brake character for that side. Then if you press both, you want the combined. Easy deal...
cms.b1 = [js1.a1 > 180] AND [js1.a2 < 180];
cms.b2 = [js1.a2 > 180] AND [js1.a1 < 180];
cms.b3 = [js1.a1 > 180] AND [js1.a2 > 180];
The cms.b1 bit is on if the left brake is down and the right brake isn't. The cms.b2 bit is on if the right brake is down and the left isn't. The cms.b3 bit is on if both are down.
CFS2 recognizes analog toe brakes, though, doesn't it? Give you differential steering that's a little better then the off/on stuff. I talked to a fellow a couple of weeks back that needed one brake pedal to activate both in FS since it doesn't have combined analog brake, only the keys. That was easy, we just split the pedal out to two axes, the only trick is that the left and right brakes need to go to different CM Devices or you can't make the assignments in FS. When you try it with then on one device, it always picks the first axis, you can never get to the second one.
Anyway, once that was working, we played around a bit and tapped of some of the X axis on his yoke (stick would work too) and then added it to one side and subtracted it to the other. That let him use the yoke to steer the aircraft by putting on a little brack and then using the yoke to add to one and subtract from the other. Then again, maybe CFS2 doesn't allow differential braking. I'm not really sure.
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
531_Ghost
04-04-2005, 01:35 AM
Whooooo Hoooooo I knew I came to the right place! Works like a charm Bob!
and as promised...
:cheers: :cheers: :cheers: :cheers: :cheers: :cheers:
Bob Church
04-04-2005, 01:52 AM
Hi Ghost,
>> Whooooo Hoooooo I knew I came to the right place! Works like a charm Bob! <<
Great! :) Have fun with it!
Best regards,
- Bob
The StickWorks
http://www.stickworks.com
Hrdina
04-04-2005, 12:24 PM
I've never programmed the brakes before, but I assume it's not possible (or highly unlikely) to have a raw value of exactly 180?
If it is, you might want to use a "<=" instead of "<" for cms.b1 and cms.b2. Otherwise you won't get any brakes if you happen to get exactly 180 on one pedal or the other.
531_Ghost
04-04-2005, 01:32 PM
Actually Hrdina, there's a few ways to program toe brakes. I am attempting to take bigger baby steps with my scripting, hense, my question to the forum ;)
A value set to 180 lets you press on the pedal a wee bit before you actually press the brake. It's a value over 180 that the controller is looking for to press the "Apply/Release" key stroke set to cms.b1.... And as Bob says, in the game the left and right toe brake are programmable axis. Both work as well as the ol K.I.S.S. method. (do a forum search you'll find 'em)
:salute:
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.