Skip to content

Conversation

samuelbles07
Copy link
Collaborator

@samuelbles07 samuelbles07 commented Oct 31, 2024

Changes

New measurements

  • Particle count 0.5 and 5.0. Except 5.0 only for indoor monitor.

New field on json payload

  • pm005Count
  • pm50Count

Updated field on json payload

  • pm02Count

See docs/local-server.md for more detail of each field above

src/AgValue.cpp Outdated
utils::isValidPm03Count(_pm_05_pc[1].update.avg)) {
float avg = (_pm_05_pc[0].update.avg + _pm_05_pc[1].update.avg) / 2.0f;
pms["pm005Count"] = ag.round2(avg);
pms["channels"]["1"]["pm005Count"] = ag.round2(_pm_05_pc[0].update.avg);
Copy link
Collaborator

Choose a reason for hiding this comment

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

005 vs 05, I think we should align this to avoid confusion

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just follow the existing formatting. Is it better if we use pms05Count and pms50Count or pms5Count? If yes, shouldn't we need to update other field too then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changes

  • pm25Count to pm02Count
  • pm05Count to pm50Count

Detail on local-server.md

@@ -136,13 +136,27 @@ int PMS5003::getPm03ParticleCount(void) {
*/
int PMS5003::getPm01ParticleCount(void) { return pms.getCount1_0(); }

/**
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think such descriptions don't provide any value, the same information is already included in the method signature. Propose to gradually remove these.

@samuelbles07 samuelbles07 merged commit f90b2e1 into develop Nov 1, 2024
20 checks passed
@samuelbles07 samuelbles07 deleted the feat/particle-count branch November 10, 2024 12:25
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