Open matlo opened 6 years ago
LUA scripting seems overkill and raises security concerns when run from an elevated process.
The network API allows controlling a GIMX instance from another process, e.g. a python process. The client could request all devices, and then the server could notify the device events, the controller status, the output reports (rumble, force feedback, leds, wheel range...), and the update period ticks.
Currently GIMX only allows either network input or device input. It could be possible to have both at the same time.
The_ LUA script should be provided with the following data:the complete device listthe accumulated device events for previously active controlsthe new device eventsthe previous controller statethe current controller stateThe LUA script should return the following data:the new controller statedevice events to push next refresh periodThe straightforward way to do this seems to push everything on the LUA stack. It may be overkill, maybe using the registry is better.The LUA script should be checked:sandbox: whitelist only necessary functions (adjust the script environment)printmath.*anything else?no bytecodelimit number of CPU cycleslimit memory usage