mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-09 00:22:13 +02:00
get JS source functions working across threads
This commit is contained in:
parent
7956d737ab
commit
8578b40236
2 changed files with 4 additions and 3 deletions
|
@ -29,6 +29,9 @@ if (hydra !== undefined) {
|
|||
var mapping = Controller.newMapping("Test");
|
||||
var standard = Controller.Standard;
|
||||
print("standard:" + standard);
|
||||
mapping.from(function () { return Math.sin(Date.now() / 250); }).to(function (newValue, oldValue, source) {
|
||||
print("function source newValue:" + newValue + ", oldValue:" + oldValue + ", source:" + source);
|
||||
});
|
||||
mapping.from(hydra.L1).to(standard.A);
|
||||
mapping.from(hydra.L2).to(standard.B);
|
||||
mapping.from(hydra.L3).to(function (newValue, oldValue, source) {
|
||||
|
|
|
@ -62,9 +62,7 @@ namespace controller {
|
|||
};
|
||||
|
||||
float ScriptEndpoint::value() {
|
||||
if (QThread::currentThread() == thread()) {
|
||||
updateValue();
|
||||
}
|
||||
updateValue();
|
||||
return _lastValue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue