Skip to content

Fix sensor count reporting #454

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

Merged
merged 2 commits into from
Jun 1, 2025
Merged

Fix sensor count reporting #454

merged 2 commits into from
Jun 1, 2025

Conversation

gorbit99
Copy link
Contributor

Currently main, when not using IMU_AUTO, will report the configured sensor count ("n sensor(s) configured") as the number of entries in the SENSOR_DESC_LIST, even if some of them fail to be configured. This PR fixes that.

@gorbit99 gorbit99 requested review from Eirenliel and unlogisch04 May 26, 2025 15:16
@Eirenliel
Copy link
Member

I'm not sure this is a correct behavior. If there are ERRORS it still should be like sensor is attached. It should only be not a sensor if the sensor isn't found, which isn't what isWorking() checks.

@gorbit99
Copy link
Contributor Author

@Eirenliel this PR just restores the behaviour of the code from before code cleanup was merged.

if (sensor->isWorking()) { \

I think it is the correct behaviour, as a sensor shouldn't really be considered "configured" if it couldn't be communicated with.

@Eirenliel Eirenliel merged commit cabceb2 into main Jun 1, 2025
2 checks passed
@Eirenliel Eirenliel deleted the fix-sensor-count-reporting branch June 1, 2025 16:20
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