3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-26 16:15:47 +02:00

emit hardwareChanged signal to scripts

This commit is contained in:
Brad Hefta-Gaub 2015-10-28 09:34:18 -07:00
parent 45ba0645d0
commit 30f7c44f61
3 changed files with 8 additions and 1 deletions
examples/controllers
libraries/controllers/src/controllers

View file

@ -87,4 +87,9 @@ Object.keys(Controller.Hardware).forEach(function (deviceName) {
Object.keys(Controller.Actions).forEach(function (actionName) {
print("Controller.Actions." + actionName + ":" + Controller.Actions[actionName]);
});
*/
*/
Controller.hardwareChanged.connect(function () {
print("hardwareChanged");
});

View file

@ -50,6 +50,7 @@ controller::ScriptingInterface::ScriptingInterface() {
// FIXME make this thread safe
connect(userInputMapper.data(), &UserInputMapper::hardwareChanged, [=] {
updateMaps();
emit hardwareChanged();
});

View file

@ -132,6 +132,7 @@ namespace controller {
signals:
void actionEvent(int action, float state);
void inputEvent(int action, float state);
void hardwareChanged();
private:
// Update the exposed variant maps reporting active hardware