procedure TEmotivEpoc.HandleCogEvent;
var
cogEvent: EE_CognitivEvent_t;
reject: Boolean;
begin
cogEvent := EE_CognitivEventGetType(eEvent);
case cogEvent of
EE_CognitivNoEvent: Log('Cog: NoEvent');
EE_CognitivTrainingStarted:
begin
Log('Cog: TrainingStarted');
if Assigned(fCognitivTrainingStarted) then
fCognitivTrainingStarted(self);
//pbTraining.Visible := True;
//animateTraining.Start;
end;
EE_CognitivTrainingSucceeded:
begin
Log('Cog: TrainingSucceeded');
if Assigned(fCognitivTrainingSucceeded) then
fCognitivTrainingSucceeded(self, reject);
if not reject then
AcceptTraining;
//animateTraining.Stop;
//pbTraining.Visible := False;
end;
EE_CognitivTrainingFailed: Log('Cog: TrainingFailed');
EE_CognitivTrainingCompleted: Log('Cog: TrainingCompleted');
EE_CognitivTrainingDataErased: Log('Cog: TrainingDataErased');
EE_CognitivTrainingRejected: Log('Cog: TrainingRejected');
EE_CognitivTrainingReset: Log('Cog: TrainingReset');
EE_CognitivAutoSamplingNeutralCompleted: Log('Cog: AutoSamplingNeutralCompleted');
EE_CognitivSignatureUpdated: Log('Cog: SignatureUpdated');
end;
end;
Head over and check out the full source code for accessing the Emotiv EPOC API and SDK from Firemonkey.