Commit 0bdfbacd authored by Matthias Möller's avatar Matthias Möller

server isn't sending, when BCI-mode is off

parent 56e19423
......@@ -3,7 +3,7 @@ import Ember from 'ember';
export default Ember.Service.extend({
websockets : Ember.inject.service("websockets"),
socketReference:null,
socketReference: null,
status:"",
isActivated: false,
activatedControllers: {},
......@@ -32,7 +32,7 @@ export default Ember.Service.extend({
data = JSON.parse(data);
let mentalCommand = data["mentalCommand"];
console.log(mentalCommand);
this.triggerZoom(mentalCommand);
this.triggerMentalCommand(mentalCommand);
}
},
......@@ -41,7 +41,7 @@ export default Ember.Service.extend({
},
triggerZoom(mentalCommand){
triggerMentalCommand(mentalCommand){
let canvas = $("#threeCanvas")[0];
......@@ -64,9 +64,12 @@ export default Ember.Service.extend({
toogleActivation: function(controllerID, controllerFlag){
this.set("isActivated", !this.get("isActivated"));
if(controllerID){
this.get('activatedControllers')[controllerID] = controllerFlag;
}
//stops the sending of the server
if(this.get('socketReference')){
this.get('socketReference').send(this.get('isActivated'));
}
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment