Jump to content

Recommended Posts

Posted

"%.1f" is a Lua string format. It determines how a number will be presented. I.e. the "f" means a floating-point number and the ".1" means one digit after the decimal.

 

E.g. given a number like 3.14159265359, "%.1f" would produce "3.1" and "%.4f" would produce "3.1416".

 

See if this helps: http://www.lua.org/pil/20.html

Posted

PERFECT - Thanks for that explanation....

 

And.....

Yes.... but dont i have to tell export.lua what to lisent for ??

 

.... if i just send out from my server software the code C8,3026,1.0 on UDP PORT

nothing happens...it's MasterCaution Reset.... I GOT THE LIGHT BLINKING... so that part works

Posted
Yes.... but dont i have to tell export.lua what to lisent for ??

 

.... if i just send out from my server software the code C8,3026,1.0

nothing happens...it's MasterCaution Reset

 

You tell export.lua what to *send*. The export.lua that I posted *listens* for everything.

 

The button ID for Master Caution should be 3001 ("Button_1" from clickabledata.lua):

 

elements["PNT-BTN-UFC-MASTWARN"]    = 
 {class = 
   {class_type.BTN},
   hint = _("Master Caution Light"),
   device = devices.SYS_CONTROLLER,
   action = {device_commands.Button_1},
   stop_action = {device_commands.Button_1},
   arg = {403},
   arg_value = {1.0},
   arg_lim = {{0.0, 1.0}}, use_release_message = {false}
  }

Also, you must send the "0.0" as well...otherwise it would be like you pressing the button and never releasing it.

 

If that doesn't work, I will have to dig up my code since when I originally did this, it was pre-DCS:World.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...