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

finished onboarding challenge #102

Closed
wants to merge 3 commits into from

Conversation

andrei-paraschiv
Copy link

Purpose

Explain the purpose of the PR here, including references to any existing Notion tasks.

New Changes

  • Explain new changes

Testing

  • Explain tests that you ran to verify code functionality.

Outstanding Changes

  • If there are non-critical changes (i.e. additional features) that can be made to this feature in the future, indicate them here.

Copy link
Contributor

@Navtajh04 Navtajh04 left a 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

lm75bd/lm75bd.c Outdated Show resolved Hide resolved
lm75bd/lm75bd.c Outdated Show resolved Hide resolved
services/thermal_mgr/thermal_mgr.c Show resolved Hide resolved
services/thermal_mgr/thermal_mgr.c Show resolved Hide resolved
services/thermal_mgr/thermal_mgr.c Outdated Show resolved Hide resolved
services/thermal_mgr/thermal_mgr.c Outdated Show resolved Hide resolved
services/thermal_mgr/thermal_mgr.c Outdated Show resolved Hide resolved
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?
Copy link
Contributor

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

Copy link
Contributor

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)

Copy link
Author

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?

addTemperatureTelemetry(temp);
break;
case THERMAL_MGR_EVENT_INTERRUPT:
if (readTempLM75BD(config.devAddr, &temp) != ERR_CODE_SUCCESS) break;
Copy link
Contributor

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;

Copy link
Author

Choose a reason for hiding this comment

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

Same as above

Copy link
Contributor

@Navtajh04 Navtajh04 left a comment

Choose a reason for hiding this comment

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

LGTN

@Navtajh04 Navtajh04 closed this Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants