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

View file

@ -88,3 +88,8 @@ Object.keys(Controller.Actions).forEach(function (actionName) {
print("Controller.Actions." + actionName + ":" + Controller.Actions[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 // FIXME make this thread safe
connect(userInputMapper.data(), &UserInputMapper::hardwareChanged, [=] { connect(userInputMapper.data(), &UserInputMapper::hardwareChanged, [=] {
updateMaps(); updateMaps();
emit hardwareChanged();
}); });

View file

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