Skip to content

Commit

Permalink
ref: Conditionally flash the photodiode on the holdUpMarker trial
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertGemmaJr committed Dec 12, 2023
1 parent e2d05a9 commit 518d976
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/trials/holdUpMarker.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import htmlButtonResponse from "@jspsych/plugin-html-button-response";

import { config, language } from "../config/main";
import { photodiodeGhostBox } from "../lib/markup/photodiode";
import { config, eventCodes, language } from "../config/main";
import { pdSpotEncode, photodiodeGhostBox } from "../lib/markup/photodiode";
import { baseStimulus } from "../lib/markup/stimuli";
import { h1, p } from "../lib/markup/tags";

Expand All @@ -23,7 +23,10 @@ const holdUpMarkerTrial = {
return holdUpMarkerPrompt;
},
choices: [language.prompts.continue.button],
// TODO: Flash photodiode
// Conditionally flash the photodiode when the trial first loads
on_load: () => {
if (config.USE_PHOTODIODE) pdSpotEncode(eventCodes.open_task);
},
};

export { holdUpMarkerTrial };

0 comments on commit 518d976

Please sign in to comment.