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: Sensor/HallSensor.cpp
- Revision:
- 1:d43df9a7cef2
- Parent:
- 0:3ead6014ad51
diff -r 3ead6014ad51 -r d43df9a7cef2 Sensor/HallSensor.cpp
--- a/Sensor/HallSensor.cpp Sun Nov 03 23:28:27 2019 +0000
+++ b/Sensor/HallSensor.cpp Sat Oct 31 07:12:28 2020 +0000
@@ -1,7 +1,7 @@
#include "HallSensor.h"
#define REF 23400.0
#define MIN 60.0
-#define SEC_PERIOD (1.0 / (REF / MIN ))
+#define SEC_PERIOD (1.0 / (2.0 * REF / MIN ))
HallSensor::HallSensor (PinName a) : m_hallSensor (a,PullUp)
{
@@ -34,4 +34,4 @@
int HallSensor::getPinState ()
{
return m_hallSensor;
-}
\ No newline at end of file
+}