Skip to content

Commit da83273

Browse files
committed
Readme error fixed.
1 parent 4311208 commit da83273

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,15 @@ speed. Units:
4040
accel: Typically G. Values are normalised in the algorithm so units are irrelevant.
4141
gyro: Degrees per second.
4242

43-
```calibrate(getxyz, stopfunc)```
43+
```calibrate(getxyz, stopfunc, waitfunc)```
4444

4545
The first argument is a function returning a tuple of magnetic x,y,z values from the sensor.
4646
The second is a function returning ```True``` when calibration is deemed complete: this could
47-
be a timer or an input from the user. The method updates the ```magbias``` property.
47+
be a timer or an input from the user.
48+
The third is a function providing a delay. Some hardware may require a delay between magnetometer
49+
readings. In multi-threaded environments the function provides an opportunity to yield
50+
execution to other threads.
51+
The method updates the ```magbias``` property.
4852

4953
Calibration is performed by rotating the unit around each orthogonal axis while the routine
5054
runs, the aim being to compensate for offsets caused by static local magnetic fields.
@@ -77,7 +81,7 @@ these will be aliased down into the filter passband and affect the results. It's
7781
neccessary to isolate the sensor with a mechanical filter, typically a mass supported on very
7882
soft rubber mounts.
7983

80-
If using a magnetoemeter consider the fact that the Earth's magnetic field is small: the field
84+
If using a magnetometer consider the fact that the Earth's magnetic field is small: the field
8185
detected may be influenced by ferrous metals in the machine being controlled or by currents in
8286
nearby wires. If the latter are variable there is little chance of compensating for them, but
8387
constant magnetic offsets may be addressed by calibration. This involves rotating the machine

0 commit comments

Comments
 (0)