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

Fix two bugs in embObjMultipleFTsensors #871

Merged
merged 2 commits into from
May 11, 2023

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented May 11, 2023

Description of the two bugs:

Fix implementation of embObjMultipleFTsensors::getStatus methods when no measure has been read

Before this commit, embObjMultipleFTsensors::getStatus returned MAS_OK even if no measure has been read from the sensor, so it returns MAS_OK and then returns an invalid measure. After this commit, before a measure has been readed the status returned is MAS_WAITING_FOR_FIRST_READ.

Fix implementation of embObjMultipleFTsensors::getNrOfTemperatureSensors()

Due to how the embObjMultipleFTsensors::getNrOfTemperatureSensors() function was implemented and how the internal buffers of embObjMultipleFTsensors were initialized, the embObjMultipleFTsensors::getNrOfTemperatureSensors() method was return 0 until an actual temperature measure was reported. This commit fixes this by using to compute getNrOfTemperatureSensors a buffer that has the correct shape even if no temperature measure has been read.

…s when no measure has been read

Before this commit, embObjMultipleFTsensors::get<Type>Status returned MAS_OK even if no measure has
been read from the sensor, so it returns MAS_OK and then returns an invalid measure.
After this commit, before a measure has been readed the status returned is MAS_WAITING_FOR_FIRST_READ.
…ors()

Due to how the embObjMultipleFTsensors::getNrOfTemperatureSensors() function
was implemented and how the internal buffers of embObjMultipleFTsensors were
initialized, the embObjMultipleFTsensors::getNrOfTemperatureSensors() method
was return 0 until an actual temperature measure was reported. This commit
fixes this by using to compute getNrOfTemperatureSensors a buffer that has
the correct shape even if no temperature measure has been read.
Copy link
Member

@pattacini pattacini left a comment

Choose a reason for hiding this comment

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

Waiting for the CI to complete before merging.

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