-
Notifications
You must be signed in to change notification settings - Fork 171
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
finished onboarding challenge #102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple of minor changes
services/thermal_mgr/thermal_mgr.c
Outdated
if (xQueueReceive(thermalMgrQueueHandle, &event, 0) == pdTRUE) { // timeout? | ||
switch (event.type) { | ||
case THERMAL_MGR_EVENT_MEASURE_TEMP_CMD: | ||
if (readTempLM75BD(config.devAddr, &temp) != ERR_CODE_SUCCESS) break; // What should be done if error? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log the error if there was an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also nitpick but I would explicitly use continue
to make it more clear and also in case something is added after the switch case for some reason in the future (I don't see why this would happen though)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand, I believe continue doesn't work in a switch case?
services/thermal_mgr/thermal_mgr.c
Outdated
addTemperatureTelemetry(temp); | ||
break; | ||
case THERMAL_MGR_EVENT_INTERRUPT: | ||
if (readTempLM75BD(config.devAddr, &temp) != ERR_CODE_SUCCESS) break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log if this is an error code and continue;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTN
Purpose
Explain the purpose of the PR here, including references to any existing Notion tasks.
New Changes
Testing
Outstanding Changes