// Update is called once per frame void Update() { if (!sendRawEnable && (UpdateRawdata1Event != null || UpdateRawdata2Event != null)) { sendRawEnable = true; thinkGear.setSendRawdataEnable(true); } if (sendRawEnable && UpdateRawdata1Event == null && UpdateRawdata2Event == null) { sendRawEnable = false; thinkGear.setSendRawdataEnable(false); } if (!sendEEGEnable && (UpdateDelta1Event != null || UpdateDelta2Event != null || UpdateTheta1Event != null || UpdateTheta2Event != null || UpdateLowAlpha1Event != null || UpdateLowAlpha2Event != null || UpdateLowBeta1Event != null || UpdateLowBeta2Event != null || UpdateLowGamma1Event != null || UpdateLowGamma2Event != null || UpdateHighAlpha1Event != null || UpdateHighAlpha2Event != null || UpdateHighBeta1Event != null || UpdateHighBeta2Event != null || UpdateHighGamma1Event != null || UpdateHighGamma2Event != null)) { sendEEGEnable = true; thinkGear.setSendEEGEnable(true); } if (sendEEGEnable && UpdateDelta1Event == null && UpdateDelta2Event == null && UpdateTheta1Event == null && UpdateTheta2Event == null && UpdateLowAlpha1Event == null && UpdateLowAlpha2Event == null && UpdateLowBeta1Event == null && UpdateLowBeta2Event == null && UpdateLowGamma1Event == null && UpdateLowGamma2Event == null && UpdateHighAlpha1Event == null && UpdateHighAlpha2Event == null && UpdateHighBeta1Event == null && UpdateHighBeta2Event == null && UpdateHighGamma1Event == null && UpdateHighGamma2Event == null) { sendEEGEnable = false; thinkGear.setSendEEGEnable(false); } if (!sendESenseEnable && (UpdateAttention1Event != null || UpdateAttention2Event != null || UpdateMeditation1Event != null || UpdateMeditation2Event != null)) { sendESenseEnable = true; thinkGear.setSendESenseEnable(true); } if (sendESenseEnable && UpdateAttention1Event == null && UpdateAttention2Event == null && UpdateMeditation1Event == null && UpdateMeditation2Event == null) { sendESenseEnable = false; thinkGear.setSendESenseEnable(false); } if (!sendBlinkEnable && (UpdateBlink1Event != null || UpdateBlink2Event != null)) { sendBlinkEnable = true; thinkGear.setSendBlinkEnable(true); } if (sendBlinkEnable && UpdateBlink1Event == null && UpdateBlink2Event == null) { sendBlinkEnable = false; thinkGear.setSendBlinkEnable(false); } }