Skip to content

Conversation

@NicholasIanMerritt
Copy link
Contributor

What changed?

Restructured and mostly rewrote the loadCellSample.cpp app.

-Added running variance calculation and standard deviation reporting to remote messages.
-Added missed/successful/attempted readings counting. N for stats is now successful readings, not reading attempts.
-Created new format for remote LC message that fits with ME team needs.

Also some smaller things: Fixed some out of order checks vs measurements, changed some misleading names, deleted unused defines and variables.

Code has been tested on a loadcell and the remote-reported standard deviation matches one calculated after the fact with SD data.

How does it make Bristlemouth better?

-new features (stdev, reading counts)
-much more intelligible

Where should reviewers focus?

Checklist

  • Add or update unit tests for changed code -- No relevant unit tests I think.
  • Ensure all submodules up to date. If this PR relies on changes in submodules, merge those PRs first, then point this PR at/after the merge commit
  • [ ?] Ensure code is formatted correctly with clang-format. If there are large formatting changes, they should happen in a separate whitespace-only commit on this PR after all approvals.

//If load cell read fails
else {
missed_reading_counter ++; // to track at the end
reading_attempts_counter++; //This still updates so we send our message on time. We do not interate successful_reading_count.
Copy link
Collaborator

Choose a reason for hiding this comment

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

we could increment this outside of the if/else since it is incremented in both cases.

Copy link
Collaborator

@victorsowa12 victorsowa12 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 to me! Had a small optimization suggestion

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.

3 participants