public void SetFacialExpressionConfigMenuValues() { int facial = facialExpresionDropdown.value; facialExpresionActionsDropdown.value = ActionManager.Instance.GetMappedActionIndex(interfaceName, facialExpresionName[facial]); SetTriggerValues(GLPlayerPrefs.GetFloat(Scope, "Emotiv" + facialExpresionName[facial] + "TriggerLevel") * 10, facialExpressionTriggerLevel, facialExpressionTriggerNumber); facialExpresionActionsDropdown.RefreshShownValue(); }
public void SetDbGesturesConfigMenuValues() { int gesture = dbGestureDropdown.value; dbGestureActionsDropdown.value = ActionManager.Instance.GetMappedActionIndex(interfaceName, dbGesturesName[gesture]); SetTriggerValues(GLPlayerPrefs.GetFloat(Scope, interfaceName + dbGesturesName[gesture] + "TriggerLevel") * 10, triggerLevelValue, triggerLevelText); SetTriggerValues(GLPlayerPrefs.GetFloat(Scope, interfaceName + dbGesturesName[gesture] + "UntriggerLevel") * 10, untriggerLevelValue, untriggerLevelText); dbGestureActionsDropdown.RefreshShownValue(); }
public void SetMentalCommandConfigMenuValues() { int command = mentalCommandDropdown.value; mentalCommandActionsDropdow.value = ActionManager.Instance.GetMappedActionIndex(interfaceName, mentalCommandName[command]); SetTriggerValues(GLPlayerPrefs.GetInt(Scope, interfaceName + mentalCommandName[command] + "CommandTicks"), mentalCommandSensibilityValue, mentalCommandSensibilityText); SetTriggerValues(GLPlayerPrefs.GetInt(Scope, interfaceName + mentalCommandName[command] + "CommandMistakes"), mentalCommandMistakeValue, mentalCommandMistakeText); SetTriggerValues(GLPlayerPrefs.GetFloat(Scope, interfaceName + mentalCommandName[command] + "CommandTriggerLevel") * 10, mentalCommandTriggerLevel, mentalCommandTriggerNumber); mentalCommandActionsDropdow.RefreshShownValue(); }
public void LoadActions() { string Scope = ProfileManager.Instance.currentEvaluationScope; //Obtaining action index actionIndexMental = new int[mentalCommandName.Length]; actionIndexFacial = new int[facialExpresionName.Length]; for (int i = 0; i < mentalCommandName.Length; i++) { actionIndexMental[i] = ActionManager.Instance.GetMappedActionIndex(interfaceName, mentalCommandName[i]); } for (int i = 0; i < facialExpresionName.Length; i++) { actionIndexFacial[i] = ActionManager.Instance.GetMappedActionIndex(interfaceName, facialExpresionName[i]); } //Obtaining mental commands ticks, mistakes and trigger level ticksIndex = new int[mentalCommandName.Length]; mistakesIndex = new int[mentalCommandName.Length]; commandTriggerLevelIndex = new float[mentalCommandName.Length]; for (int i = 0; i < mentalCommandName.Length; i++) { ticksIndex[i] = GLPlayerPrefs.GetInt(Scope, interfaceName + mentalCommandName[i] + "CommandTicks"); mistakesIndex[i] = GLPlayerPrefs.GetInt(Scope, interfaceName + mentalCommandName[i] + "CommandMistakes"); commandTriggerLevelIndex[i] = GLPlayerPrefs.GetFloat(Scope, interfaceName + mentalCommandName[i] + "CommandTriggerLevel"); } //Facial expression trigger level faceTriggerLevelIndex = new float[facialExpresionName.Length]; for (int i = 0; i < facialExpresionName.Length; i++) { faceTriggerLevelIndex[i] = GLPlayerPrefs.GetFloat(Scope, interfaceName + facialExpresionName[i] + "TriggerLevel"); } //Tie to action manager AddAction(0, mentalCommandCode[0]); AddAction(1, mentalCommandCode[1]); AddAction(2, mentalCommandCode[2]); AddAction(3, mentalCommandCode[3]); AddAction(4, mentalCommandCode[4]); AddAction(0, facialExpresionCode[0]); AddAction(1, facialExpresionCode[1]); AddAction(2, facialExpresionCode[2]); AddAction(3, facialExpresionCode[3]); }
/* * EEGManager.Instance.MentalCommandCurrentActionPower; * EEGManager.Instance.FacialExpressionIsRightEyeWinking; * EEGManager.Instance.FacialExpressionIsLeftEyeWinking; * EEGManager.Instance.FacialExpressionIsUserBlinking; * EEGManager.Instance.FacialExpressionUpperFaceActionPower; * EEGManager.Instance.FacialExpressionSmileExtent; * EEGManager.Instance.FacialExpressionLowerFaceActionPower; * EEGManager.Instance.FacialExpressionLowerFaceAction; * EEGManager.Instance.FacialExpressionUpperFaceAction; */ void OnEnable() { currentVisualization = GLPlayerPrefs.GetString(Scope, "CurrentVisualization"); currentObject = GLPlayerPrefs.GetString(Scope, "CurrentInformationObject"); Scope = ProfileManager.Instance.currentEvaluationScope; float aux = GLPlayerPrefs.GetFloat(Scope, "EmotivTickSensibility") * 10; SetTriggerValues((int)aux, tickSensibilityValue, tickSensibilityText); ActionManager.Instance.ReloadMappingActionsDropdown(facialExpresionActionsDropdown); ActionManager.Instance.ReloadMappingActionsDropdown(mentalCommandActionsDropdow); UpdateMappedActions(inputNamesForSummary); SetMentalCommandConfigMenuValues(); SetFacialExpressionConfigMenuValues(); }
public void UpdateSettingsCanvas() { CleanSettingsCanvas(); int physicalResponseIndex = physicalResponseDropdown.value; int triggerWithIndex = triggerWithDropdown.value; string treshold = triggers[physicalResponseIndex][triggerWithIndex]; switch (treshold) { case "Range": triggerWithSettings[0].SetActive(true); SetTriggerValues(GLPlayerPrefs.GetFloat(scope, interfaceName + physicalResponse[physicalResponseIndex] + "LowestRange"), lowestRangeSlider, lowestRangeNumber); SetTriggerValues(GLPlayerPrefs.GetFloat(scope, interfaceName + physicalResponse[physicalResponseIndex] + "HighestRange"), highestRangeSlider, highestRangeNumber); break; case "Treshold": triggerWithSettings[1].SetActive(true); SetTriggerValues(GLPlayerPrefs.GetFloat(scope, interfaceName + physicalResponse[physicalResponseIndex] + "Treshold"), tresholdSlider, tresholdNumber); break; } }
void OnEnable() { Scope = ProfileManager.Instance.currentEvaluationScope; if (ActionManager.Instance.bgiiesMode) { gesture1TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture1TriggerLevelBgiies"); gesture2TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture2TriggerLevelBgiies"); gesture3TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture3TriggerLevelBgiies"); gesture4TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture4TriggerLevelBgiies"); gesture5TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture5TriggerLevelBgiies"); gesture6TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture6TriggerLevelBgiies"); gesture7TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture7TriggerLevelBgiies"); gesture1UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture1UntriggerLevelBgiies"); gesture2UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture2UntriggerLevelBgiies"); gesture3UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture3UntriggerLevelBgiies"); gesture4UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture4UntriggerLevelBgiies"); gesture5UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture5UntriggerLevelBgiies"); gesture6UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture6UntriggerLevelBgiies"); gesture7UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture7UntriggerLevelBgiies"); openHandRightAssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "openHandRightAssignedActionIndexBgiies"); openHandLeftAssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "openHandLeftAssignedActionIndexBgiies"); closeHandRightAssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "closeHandRightAssignedActionIndexBgiies"); closeHandLeftAssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "closeHandLeftAssignedActionIndexBgiies"); lassoHandRightAssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "lassoHandRightAssignedActionIndexBgiies"); lassoHandLeftAssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "lassoHandLeftAssignedActionIndexBgiies"); gesture1AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture1AssignedActionIndexBgiies"); gesture2AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture2AssignedActionIndexBgiies"); gesture3AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture3AssignedActionIndexBgiies"); gesture4AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture4AssignedActionIndexBgiies"); gesture5AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture5AssignedActionIndexBgiies"); gesture6AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture6AssignedActionIndexBgiies"); gesture7AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture7AssignedActionIndexBgiies"); } else { gesture1TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture1TriggerLevelVortices"); gesture2TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture2TriggerLevelVortices"); gesture3TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture3TriggerLevelVortices"); gesture4TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture4TriggerLevelVortices"); gesture5TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture5TriggerLevelVortices"); gesture6TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture6TriggerLevelVortices"); gesture7TriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture7TriggerLevelVortices"); gesture1UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture1UntriggerLevelVortices"); gesture2UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture2UntriggerLevelVortices"); gesture3UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture3UntriggerLevelVortices"); gesture4UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture4UntriggerLevelVortices"); gesture5UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture5UntriggerLevelVortices"); gesture6UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture6UntriggerLevelVortices"); gesture7UntriggerLevel = GLPlayerPrefs.GetFloat(Scope, "gesture7UntriggerLevelVortices"); openHandRightAssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "openHandRightAssignedActionIndexVortices"); openHandLeftAssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "openHandLeftAssignedActionIndexVortices"); closeHandRightAssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "closeHandRightAssignedActionIndexVortices"); closeHandLeftAssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "closeHandLeftAssignedActionIndexVortices"); lassoHandRightAssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "lassoHandRightAssignedActionIndexVortices"); lassoHandLeftAssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "lassoHandLeftAssignedActionIndexVortices"); gesture1AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture1AssignedActionIndexVortices"); gesture2AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture2AssignedActionIndexVortices"); gesture3AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture3AssignedActionIndexVortices"); gesture4AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture4AssignedActionIndexVortices"); gesture5AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture5AssignedActionIndexVortices"); gesture6AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture6AssignedActionIndexVortices"); gesture7AssignedActionIndex = GLPlayerPrefs.GetInt(Scope, "gesture7AssignedActionIndexVortices"); } SetActionNameByIndex(gesture1AssignedActionText, gesture1AssignedActionIndex); SetActionNameByIndex(gesture2AssignedActionText, gesture2AssignedActionIndex); SetActionNameByIndex(gesture3AssignedActionText, gesture3AssignedActionIndex); SetActionNameByIndex(gesture4AssignedActionText, gesture4AssignedActionIndex); SetActionNameByIndex(gesture5AssignedActionText, gesture5AssignedActionIndex); SetActionNameByIndex(gesture6AssignedActionText, gesture6AssignedActionIndex); SetActionNameByIndex(gesture7AssignedActionText, gesture7AssignedActionIndex); SetActionNameByIndex(openHandRightAssignedActionText, openHandRightAssignedActionIndex); SetActionNameByIndex(openHandLeftAssignedActionText, openHandLeftAssignedActionIndex); SetActionNameByIndex(closeHandRightAssignedActionText, closeHandRightAssignedActionIndex); SetActionNameByIndex(closeHandLeftAssignedActionText, closeHandLeftAssignedActionIndex); SetActionNameByIndex(lassoHandRightAssignedActionText, lassoHandRightAssignedActionIndex); SetActionNameByIndex(lassoHandLeftAssignedActionText, lassoHandLeftAssignedActionIndex); CleanKinectActions(); SetBasicGesturesConfigMenuValues(); SetDbGesturesConfigMenuValues(); ActionManager.Instance.ReloadProfileDropdown(dbGesturesActionsDropdown); ActionManager.Instance.ReloadProfileDropdown(basicGesturesActionsDropdown); }