Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NVM rainfall backup looking more appealing every day.

...

Disappointed that I’m seeing RESETs, but found something in my code

Code Block
languagecpp
  //Average samples
  if (msTotal || samples)
  {
    windSpeed = 1.49 * 1000 / (msTotal / samples);
  }

My logic to check for divide by zero is wrong. Should be &&

Code Block
  //Average samples
  if (msTotal && samples)
  {
    windSpeed = 1.49 * 1000 / (msTotal / samples);
  }

Running boot experiment without sensor connected now. msTotal and samples will both be zero and this case will never happen.