frank Posted November 28, 2012 Author Posted November 28, 2012 also... can you explain what this meen [300]="%.1f" I know [300]= but this "%.1f" ?? http://www.dcscockpit.com
frank Posted November 28, 2012 Author Posted November 28, 2012 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 http://www.dcscockpit.com
SparkyOV Posted November 28, 2012 Posted November 28, 2012 "%.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
frank Posted November 28, 2012 Author Posted November 28, 2012 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 http://www.dcscockpit.com
SparkyOV Posted November 28, 2012 Posted November 28, 2012 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.
frank Posted November 28, 2012 Author Posted November 28, 2012 ohhhh, so the "3000" starts over for every panel ID ?? http://www.dcscockpit.com
SparkyOV Posted November 28, 2012 Posted November 28, 2012 ohhhh, so the "3000" starts over for every panel ID ?? From my understanding, yes.
frank Posted November 28, 2012 Author Posted November 28, 2012 IT WOOOOOOOOOOOORKKKKKKKKKKKKKK You are MY HERO ;) http://www.dcscockpit.com
SparkyOV Posted November 29, 2012 Posted November 29, 2012 Hooray! Good luck! PM me if you have further questions.
Recommended Posts