This reverts commit d4c653a3d2.
on the RPI1 the wait in runcommand can sit there forever. Adding a sleep helps, but
this isn't ideal. Problem is likely due to the signal hander not yet being set up on the rpi1
when launching joy2key when the kill is executed.
The INT signal won't kill the python process if called before the
script has had time to register the signal handler. Avoid this case
by using the USR1 signal, which will terminate the process under the
same conditions.
Unfortunately, terminating the process will lead to unwanted terminal
output - "User defined signal 1" - due to bash job control monitoring.
Solve this by adding a wait command that redirects the process output
to /dev/null.
Additionally, register joy2key's signal handler for INT and TERM cases
so that it will gracefully exit in all possible cases.
Under certain scenarios, joy2key.py does not receive the INT signal
which leads to the process staying resident. Avoid this situation by
sending the signal repeatedly until a successful exit code is received.
* replace many of the existing wget | tar commands with the new function
* include error logging in the function via runCmd, to trap download/unpacking issues
* Allow dpad control in addition to axis for cursor keys
* Verify existence of keys before mapping
The cursor keys will now be mapped to both the axis and dpad, but if
the dpad is not present, only the axis mappings will be used.
This should also make it possible to add default mappings for X/Y
buttons without having to worry about pad compatibility.
* only force gcc version to 4.9 on debian/raspbian 8
* use libpng-dev for debian 9+
* set debian version to 9 for ubuntu 16.10 and above (for libpng naming).
I was having problems when using loadModuleConfig and the variable's value has spaces.
Example: when using `loading_text="NOW LOADING"`, loadModuleConfig was getting `key=loading_text` and `value=NOW`. After this change it's getting `value="NOW LOADING"`.
* if device parameter is /dev/input/jsX it will read from all joysticks
* if a joystick is removed or another reconnected it will be picked up
* default runcommand and helpers to use all joypads