Skip to content

Commit

Permalink
change call function structure / call function version
Browse files Browse the repository at this point in the history
  • Loading branch information
YUUU23 committed Jul 31, 2024
1 parent e990a18 commit 4bad593
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@electron/fuses": "^1.8.0",
"@fortawesome/fontawesome-free": "^6.4.2",
"@jspsych/plugin-audio-keyboard-response": "^1.1.3",
"@jspsych/plugin-call-function": "^2.0.0",
"@jspsych/plugin-call-function": "^1.1.0",
"@jspsych/plugin-fullscreen": "^1.2.0",
"@jspsych/plugin-html-button-response": "^1.1.1",
"@jspsych/plugin-html-keyboard-response": "^1.1.1",
Expand Down
6 changes: 5 additions & 1 deletion src/experiment/procedures/startProcedure.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ export function buildStartProcedure(jsPsych) {
// Conditionally add the photodiode setup trials
if (config.USE_PHOTODIODE) {
procedure.push(holdUpMarkerTrial);
procedure.push(buildCallFunctionTrial(window.electronAPI.checkSerialPort()));
procedure.push(
buildCallFunctionTrial(() => {
window.electronAPI.checkSerialPort();
})
);
procedure.push(initPhotodiodeTrial);
}

Expand Down
4 changes: 1 addition & 3 deletions src/experiment/trials/callFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import callFunction from "@jspsych/plugin-call-function";
export function buildCallFunctionTrial(func) {
return {
type: callFunction,
func: () => {
func;
},
func: func,
};
}

0 comments on commit 4bad593

Please sign in to comment.