Commit 30f3807a authored by Matthias Möller's avatar Matthias Möller

Test2

parent d9632bd7
package Modell;
import com.emotiv.Iedk.Edk;
import com.emotiv.Iedk.EmoState;
public class MentalCommandWebSocket extends AbstractWebSocketComponent{
public int lastMentalCommand;
public double lastMentalCommandStrength;
public MentalCommandWebSocket(AbstractEmotiv emo) {
super(emo);
}
public String mentalCommandToString(int mentalCommand){
switch(mentalCommand){
case 1:
return "MC_NEUTRAL";
case 2:
return "MC_PUSH";
case 4:
return "MC_PULL";
case 8:
return "MC_LIFT";
case 16:
return "MC_DROP";
case 32:
return "MC_LEFT";
case 64:
return "MC_RIGHT";
case 128:
return "MC_ROTATE_LEFT";
case 256:
return "MC_ROTATE_RIGHT";
case 512 :
return "MC ROTATE CLOCKWISE";
default:
return "unknown";
}
}
@Override
public void actualizeComponents() {
int lastMentalCommand = EmoState.INSTANCE.IS_MentalCommandGetCurrentAction(getEmoState());
float lastMentalCommandStrength = EmoState.INSTANCE.IS_MentalCommandGetCurrentActionPower(getEmoState());
if(lastMentalCommand != this.lastMentalCommand || lastMentalCommandStrength != this.lastMentalCommandStrength){
this.lastMentalCommand = lastMentalCommand;
this.lastMentalCommandStrength = lastMentalCommandStrength;
//update
}
this.nextEmotivComponent.actualizeComponents();
}
@Override
public void show() {
// TODO Auto-generated method stub
}
}
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