Jump to content
The simFlight Network Forums

Recommended Posts

Posted

got a brandnew MCP combo (after a month+ waiting) in exchange for my faulty returned one

(~6.5 months, LCD's garbage output, - huge - Schiphol airport shop 10 minutes to drive, me lucky, now)

hip hurray

anyway

VSPE pair COM7<>COM8

[Programs]

Run1=READY,CLOSE,g:\Program Files (x86)\SerialFP2\SerialFP2.exe

[VRInsight]

1=COM5, COM8

1. Lua crash

programming default Beech King, many dials work without programming

([Aircraft7] Module = SFP2_MCP_DEFAULT_FSUIPC.dll KeyMap1 = .dat)

lights, prop sync, via mouse macro's etc, no problem, all is well, but

HDG bug dreadfully slow, so create

kingHDGinc.LUA:

-- 65879 HEADING_BUG_INC

ipc.control(65879)

ipc.control(65879)

to double the speed, but after 10+ turns, crashes FSX

when inserting sleep

kingHDGinc.LUA:

ipc.sleep(50)

ipc.control(65879)

ipc.sleep(50)

ipc.control(65879)

sleep(50) makes unusefull anyway, for it is as slow as without, but also crashes fsx

fsuipc log ends with

..

721005 [buttons.Beech King Air 350 Paint1] 608=P257,17,CL12:R,0

721052 Button changed: bRef=0, Joy=257, Btn=17, Released

721052 [buttons.Beech King Air 350 Paint1] 649=U257,17,CL12:R,0

721083 Button changed: bRef=0, Joy=257, Btn=17, Pressed

721083 [buttons.Beech King Air 350 Paint1] 608=P257,17,CL12:R,0

721115 Button changed: bRef=0, Joy=257, Btn=17, Released

721115 [buttons.Beech King Air 350 Paint1] 649=U257,17,CL12:R,0

****crash****

regular right and left Heading Bug Inc or Dec work without a hitch

what could i do? am i missing something?

also:

of course I first named Lua:

kingairHDGincrease.LUA

and forgotten my first encouter with 'Lua file name too long' (silly me, year(s) ago)

and (of course?) nothing happens, and eats time and effort

and would like to request an error flag for this (perhaps not showing in dropdown?) ? (for next time silly, Im getting old)

or LUA working with long file names?

2. DISENGAGE switch on MCP

when toggled Up or Down triggers Rx light on MCP

but only Up seems to be noticed by Fsuipc

(at least nothing shows in the log, when down)

so I cannot program down

or am I (or MCP) missing something?

thx, great job, mt

Posted

1. Lua crash

...

kingHDGinc.LUA:

-- 65879 HEADING_BUG_INC

ipc.control(65879)

ipc.control(65879)

How is this called?

If it is called on a repeating button press, then it won't crash because each call waits for the previous one to complete because exceuting another. All that happens is that if the repeats are too fast, you lose some.

If it is called on something which is repeating fast but does not set the "repeat" flag because it is not being "held down" (as, for instance, for a rotary), then, yes, it could crash FS because it will be trying to Kill and restart the Lua program faster than it can be done, resulting in a big bulid up of threads until the system breaks.

There is most certainly NEVER any need to have such a Lua program. You can program any button to send a control once, twice, as many times as you like. Just duplicate the assignment lines in the FSUIPC INI file.

Furthermore, if it is a rotary you are programming, or a VRInsight button, don't forget you should program both the Press and the Release -- you get an altrernate press and release for each press or click.

when inserting sleep

kingHDGinc.LUA:

ipc.sleep(50)

ipc.control(65879)

ipc.sleep(50)

ipc.control(65879)

sleep(50) makes unusefull anyway, for it is as slow as without, but also crashes fsx

Inserting the sleep makes it MORE likely to crash, not less, because now the Lua program takes longer to finish and so more copies will build up more quickly, waiting to be killed!

what could i do? am i missing something?

Yes. you seem to be forgetting that any button can operate any number of controls, simply by INI file editing. Or you could use an ordinary macro for your list of controls. You are misusing Lua, using it for things which are far beneath its capabilities unnecessarily.

2. DISENGAGE switch on MCP

when toggled Up or Down triggers Rx light on MCP

but only Up seems to be noticed by Fsuipc

(at least nothing shows in the log, when down)

so I cannot program down

Up is "on", down is "off". On is "pressed", off is "Released".

or am I (or MCP) missing something?

You are missing the obvious again, looking for the complex instead! On the Buttons page there are TWO places to assign things -- press and release. You are forgetting the release!

Pete

Posted

Yes. you seem to be forgetting that any button can operate any number of controls, simply by INI file editing. Or you could use an ordinary macro for your list of controls. You are misusing Lua, using it for things which are far beneath its capabilities unnecessarily.

indeed, multiple 'Heading Bug Inc' lines, i'll do that

Beech King has hardly any mouse macro's to define, amazingly, tried that, and writing 2 lua lines seemed the obvious

2. DISENGAGE switch on MCP Up is "on", down is "off". On is "pressed", off is "Released".

You are missing the obvious again, looking for the complex instead! On the Buttons page there are TWO places to assign things -- press and release. You are forgetting the release!

actually I was so much focussed on not editing the ini and doing it through the drop downs, I forgot about the 'easy' way, mt :D

Posted

Beech King has hardly any mouse macro's to define, amazingly, tried that, and writing 2 lua lines seemed the obvious

"Mouse" macros are merely ordinary macros which contain lines generated by mouse traps. The system of macros was developed long before that and contain strings of controls in any case. However, repeated assignments in the INI are the easiest for speeding things up -- but with things like Heading don't forget this may stop you setting it precisely at odd or even numbers.

Also consider assigning to both press and release. And also consider using, for the VRInsight MCP, fast and slow assignments -- many of the knobs gives 4 button numbers, two each way. Program the slow with singles, the fast with doubles or quadruples, or even use Offset Word Cyclic Increment to step in 10's.

2. DISENGAGE switch on MCP Up is "on", down is "off". On is "pressed", off is "Released".

You are missing the obvious again, looking for the complex instead! On the Buttons page there are TWO places to assign things -- press and release. You are forgetting the release!

actually I was so much focussed on not editing the ini and doing it through the drop downs, I forgot about the 'easy' way, mt :D

You can assign to Press and Release in the options dialogue. That doesn't need INI editing.

Regards

Pete

Posted
Beech King has hardly any mouse macro's to define, amazingly, tried that, and writing 2 lua lines seemed the obvious

"Mouse" macros are merely ordinary macros which contain lines generated by mouse traps.

found the 'regular' macro in the doc, I'll do that, editing a MCRO file might actually be easier then editing the ini, got to remember that
Also consider assigning to both press and release.
did that, as in your document
And also consider using, for the VRInsight MCP, fast and slow assignments -- many of the knobs gives 4 button numbers, two each way.

found fast modes in MINS BARO CRS and V/S rotary, unfortunately not is HDG SPD ALT

got my HDG in Beechking now up te speed by doubling the ini control lines, thx, mt

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.