Thank you Pete. Following your advice I was able to figure out all the bits corresponding to the lights. I can set the individual lights by calling com.writefeature() and pass in the decimal corresponding to the WORD location of the light I want to activate like this:
com.writefeature(dev, "\0\0\0\0\2" , wrf) -- parking brake light on
I've mapped all the lights to their individual bit logic and by using the above call I can call them out individually or in sets like this:
com.writefeature(dev, "\0\0\0\0\14" , wrf) -- door, low volts and parking brake light on
My question now is, what is the recommended method for turning bits on and off in my program? The method used above of expressing the parameter using back slashes seem unorthodox. I tried passing various other combinations to the writefeature function like decimals or hex, or hex strings like this "0XC". Nothing worked except the "\" notation above.
Also, what's the best way to manage the bits on and off? For example, what if I want to turn off the "low volts" light that corresponds to the 3rd bit without affecting the other bits, so I would need to pass a decimal 9, but how to do this using bitwise operators and logic functions like AND and OR?
Thanks for your help Pete, I realize this question is specific to LUA programing and not with FSUIPC, thanks for your patience.