Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Anemometer.cpp
- Revision:
- 4:5a2e51b243e0
- Parent:
- 3:3e7f7afa0f94
- Child:
- 5:a8612fe30f27
diff -r 3e7f7afa0f94 -r 5a2e51b243e0 Anemometer.cpp
--- a/Anemometer.cpp Fri Mar 12 02:28:12 2021 +0000
+++ b/Anemometer.cpp Fri Mar 12 03:18:50 2021 +0000
@@ -33,5 +33,8 @@
//checkWind
void Anemometer::checkWind(int* mode)
{
- *mode = (Anemometer::getWind() >= wthres)? OP_WIND:OP_NORMAL;
+ if(Anemometer::getWind() >= wthres)
+ *mode = OP_WIND;
+ else if(Anemometer::getWind() < wthres - WIND_HIST)
+ *mode = OP_NORMAL;
}
\ No newline at end of file