PDA

View Full Version : Cockpit Interface Master example...



geneb
08-10-2008, 02:03 PM
http://www.youtube.com/watch?v=KEPKtc_p08I

Finally getting closer to a beta version. http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

g.

geneb
08-10-2008, 02:03 PM
http://www.youtube.com/watch?v=KEPKtc_p08I

Finally getting closer to a beta version. http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

g.

ytareh
08-10-2008, 04:35 PM
That has got to be hard/difficult!

DmdSeeker
08-10-2008, 04:44 PM
Very cool.

geneb
08-10-2008, 04:53 PM
Actually it's pretty easy from the end-user standpoint.

For example the RPM display is driven by this Lua program:

--
-- Simple 7 Segment display test - uses Engine #1 RPM
--

-- We pass a specific value here because in IL2 you should specify which engine you want the RPM for.
-- The third element of the response from IL2 has what we want, so...
eng1_id = 1;
intensity = 10; -- we want the LEDS full bright
eng1_rpm = CIM:GetNumericValue("ENG_RPM", eng1_id, 3);

if eng1_rpm ~= "timeout" then
int_eng1_rpm = string.format("%d", eng1_rpm);
-- quick way to convert the fractional value to a whole number...
else
int_eng1_rpm = 0;
end

-- display the value...
CIM:SetdisplayOutput("ENG1_RPM_DISPLAY", int_eng1_rpm, intensity);


...and that's all there is to it. This particular Lua program is executed every 150ms.

g.