June 25, 200718 yr Started a week ago with "programming" in the new FSBUS compiler language. Almost erverything is working in my pedestal at the moment.The rudder trim is not yet working (took a long time to get it right in the last version too, I remember)F,FRTrim,0,0x2ec0,DBL,1,1,1,0,RWC,CRRTrim,ROTARY,29,0,A,ARTrim,-1,1,R,,FRTrim,ARTrim,1,1,0,R,,CRRTrim,ARTrim,1,1,0,ADDVALR,,ARTrim,FRTrim,1,1,0Normal rudder deflection gives values between -0,17 and +0,17 at 0x2ec0 (fsinterrogate).The above example changes the rudder knob between -1,0 and 1. (you will see strange things on the rudder knob is FS).I would like to have the ruddertrim value change with small steps, about 0.01 between 0.17 and -0.17. I tried all kind of things, but no succes. Anybody did it? It worked fine with FSBUS-NGregardsNorberthttp://home.wanadoo.nl/norbert.bosch
June 26, 200718 yr Hi Norbert, Have you try do it like this Here is an example line from FSBUS basic file not from .ini of OF CDK(RUDDERTRIM LEFT)SUB OnCSRuddertrimLIF Value = 1THEN WriteFSDirect (1,0x3110,I32,66278,1)end ifEND SUBHere the 66278 is From FSUIPC SDK kit (list of fs2004 controls)Ihave used this Whit ON-OFF-ON type of SWITCH, witch centers automaticlySo LEFT use CID 31 RID 9 AND RIGHT USE CID 31 RID 10SUB OnCSRuddertrimRIF Value = 1THEN WriteFSDirect (1,0x3110,I32,66279,1)end ifEND SUBBUT still i have problem to make it auto repeat when i keep rudder trim switch to left or right.
June 26, 200718 yr Author Thanks alot.You should get an autorepeat function by adding a timer (or some inteligent basic code), see the b7 example.Or try this:F,FRTrim,0,0x3110,DBL,1,1,6,0,WC,CSRtrimL,SWITCH,29,0,C,CSRtrimR,SWITCH,29,1,R,,CSRtrimL,FRTrim,66278,1,0,R,,CSRtrimR,FRTrim,66279,1,0,When compiling I get an -invalid format- in the R lines.I can not see what I am doing wrong though.--------------------------------------------I use a rotary for ruddertrim so I changed your code in:SUB OnCRRuddertrim IF Value = 1 THEN WriteFSDirect (1,0x3110,I32,66279,1) ELSE WriteFSDirect (1,0x3110,I32,66278,1) END IFEND SUBThat works great, exactly as it should. Since years I was wondering :what is the meaning of these 65xxx range numbers in the fs2004controls.doc? So all I have to do is to write these into 0x3110 ?But I would like as less basic code as possible. I tried this:F,FRTrim,0,0x2ec0,DBL,500,1,1,0,WC,CRRTrim,ROTARY,CID,RID,A,ARTrim,-100,100,R, RTrim,CRRTrim,ARTrim,1,1,0,ADDVALR,,ARTrim,FRTrim,1,1,0,R,,FRTrim,ARTrim,1,1,0,Works great also. Dirk Anderseck suggested to use the multiply parameter in the F line because 0x2ec0 is a floating point variabele.RegardsNorbert
Create an account or sign in to comment