Skip to content

Commit

Permalink
chore: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertGemmaJr committed Dec 13, 2023
1 parent 3e446e6 commit df9045e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/markup/photodiode.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const photodiodeGhostBox = div(span("", { id: "photodiode-spot", class: "photodi
});

/**
* Conditionally flashes a spot inside the photodiodeGhostBox
* Conditionally flashes a spot inside the photodiodeGhostBox and sends event codes to the serial port
*
* Note that this function must be executed inside the "on_load" callback of a trial
* @param {number} taskCode The unique code for the given trial on which this function executes
Expand All @@ -25,10 +25,9 @@ function pdSpotEncode(taskCode) {
throw new Error("photodiodeSpot trial is only available when running inside Electron");
}

// Conditionally pulse the photodiode and send event codes
if (config.USE_PHOTODIODE) {
const blinkTime = 40; // TODO #333: Get blink time from config.json (40ms is the default)
let numBlinks = taskCode; // TODO #333: Encode numBlinks in the event marker config
let numBlinks = taskCode; // TODO #354: Encode numBlinks in the event marker config
repeatPulseFor(blinkTime, numBlinks);
window.electronAPI.photodiodeTrigger(taskCode);
}
Expand Down

0 comments on commit df9045e

Please sign in to comment.