Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add num blinks #526

Merged
merged 11 commits into from
Aug 22, 2024
Merged

Add num blinks #526

merged 11 commits into from
Aug 22, 2024

Conversation

YUUU23
Copy link
Contributor

@YUUU23 YUUU23 commented Aug 4, 2024

  • add code and numBlinks as nested object to each event code
  • modify how even names and code are accessed to reflect the change in object structure
  • change eventCodes import in trigger.js to be more concise

@YUUU23 YUUU23 added the 4.0 Versioning: Issue in regards to version 4.0.0 release label Aug 4, 2024
@YUUU23 YUUU23 self-assigned this Aug 4, 2024
@YUUU23 YUUU23 linked an issue Aug 4, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Aug 4, 2024

Visit the preview URL for this PR (updated for commit e1f6361):

https://ccv-honeycomb--pr526-add-numblinks-pwa9jpqf.web.app

(expires Thu, 29 Aug 2024 19:57:20 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4ace1dcea913a952d2a1af84b94a4421bf36e610

Base automatically changed from ref-event-codes-json to ref-config-as-ENV August 6, 2024 16:03
Base automatically changed from ref-config-as-ENV to feat-v4 August 6, 2024 16:09
@YUUU23 YUUU23 requested a review from eldu August 12, 2024 14:48
Copy link
Contributor

@eldu eldu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! A few typos and some questions here

Where are numBlinks being used? It looks like we're just setting it right now

src/config/eventCodes.json Outdated Show resolved Hide resolved
src/config/eventCodes.json Outdated Show resolved Hide resolved
src/config/eventCodes.json Outdated Show resolved Hide resolved
YUUU23 and others added 3 commits August 12, 2024 23:21
Co-authored-by: Ellen Duong <shi.ellenduong@gmail.com>
Co-authored-by: Ellen Duong <shi.ellenduong@gmail.com>
Co-authored-by: Ellen Duong <shi.ellenduong@gmail.com>
@YUUU23
Copy link
Contributor Author

YUUU23 commented Aug 13, 2024

Looks great! A few typos and some questions here

Where are numBlinks being used? It looks like we're just setting it right now

I am actually not entirely sure of this; it seems like the most relevant case I found is here: src/lib/markup/photodiode.js, we set a blinkTime. However, I'm not sure what's the purpose for all eventCodes to have a blink time that is the same as their code.

@YUUU23 YUUU23 requested a review from eldu August 13, 2024 04:25
Copy link
Contributor

@eldu eldu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR needs @RobertGemmaJr to approve since I don't think I understand the configuration enough to give the okay 😓

src/config/eventCodes.json Outdated Show resolved Hide resolved
@YUUU23
Copy link
Contributor Author

YUUU23 commented Aug 14, 2024

I think this PR needs @RobertGemmaJr to approve since I don't think I understand the configuration enough to give the okay 😓

Sounds good! I can wait until Rob comes back to discuss more about this. Thank you for reviewing it so far : D !

Copy link
Member

@RobertGemmaJr RobertGemmaJr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks super great! Why don't we move the code and numbBlinks for each trial type into their trial in the settings.json file. This way we can delete the eventCodes.json file for some consolidation! All of the values look great!

* @param {string} trigger.productID The name of the product connected to the serial port
* @param {string} trigger.vendorID The name of the vendor connected to the serial prot
* @param {Object} trigger.settings The list of possible event with relative event codes to be triggered
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since codes are now embedded under the settings.json, I had to import the entire settings object into the trigger object to access the code

"code": 2,
"numBlinks": 2
},
"open_task": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inserted these 2 events from the original event codes file

Copy link
Member

@RobertGemmaJr RobertGemmaJr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I think eventually I will move all of the trigger stuff into the settings file but should be done in another PR. This looks fantastic! 🚀

src/experiment/procedures/honeycombProcedure.js Outdated Show resolved Hide resolved
…re.js

Co-authored-by: Robert Gemma <38439940+RobertGemmaJr@users.noreply.github.com>
@YUUU23 YUUU23 merged commit 635d342 into feat-v4 Aug 22, 2024
7 checks passed
@YUUU23 YUUU23 deleted the add-numBlinks branch August 22, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0 Versioning: Issue in regards to version 4.0.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Event codes should have name, code, and numBlinks properties
3 participants