ModularSensors icon indicating copy to clipboard operation
ModularSensors copied to clipboard

Implement batch transmission and better testing features

Open tpwrules opened this issue 2 years ago • 7 comments

Requires modification to the MonitorMyWatershed site to work properly. This PR has been marked as a draft until those changes are made.

This implementation of the protocol reuses the logic for formatting single values and buffers values as floats so there should be absolutely no change in transmitted values.

It's unclear if the two timeout extension commits at the end are still needed. I would be fine dropping them for now. I would also be fine splitting the testing button changes into a separate PR.

Please use the GitHub PR review feature to suggest changes.

tpwrules avatar Sep 18 '23 22:09 tpwrules

Can you help me understand the timed out tests? Is there anything I need to/can do about that?

I also see that some boards might need a smaller default buffer size to avoid running out of RAM?

tpwrules avatar Sep 21 '23 00:09 tpwrules

The GitHub actions stop running further tests in a group after one fails. So when the Mega failed because the program was too big for its RAM, the rest of the tests stopped.

SRGDamia1 avatar Sep 21 '23 16:09 SRGDamia1

Okay, how do you recommend we solve that? Is there a way to do board specific defines?

tpwrules avatar Sep 21 '23 16:09 tpwrules

You can do board-specific defines by checking for which board type is already defined in the compiler: https://github.com/EnviroDIY/ModularSensors/blob/5a4d77f50a15b23f1580c5254c6a8879f1848d77/examples/menu_a_la_carte/menu_a_la_carte.ino#L189

SRGDamia1 avatar Sep 21 '23 17:09 SRGDamia1

Do you know which boards have less than 16K of RAM?

tpwrules avatar Sep 21 '23 18:09 tpwrules

The Mega is the only one I'm testing.

SRGDamia1 avatar Sep 21 '23 18:09 SRGDamia1

@SRGDamia1, We'll want start working on this soon, given we've queued the following into our v0.18 release. EnviroDIY performance improvements Milestone:

  • https://github.com/ODM2/ODM2DataSharingPortal/issues/649
  • https://github.com/ODM2/ODM2DataSharingPortal/pull/674

aufdenkampe avatar Jan 24 '24 18:01 aufdenkampe