Compass: example sketch displays in milligauss

This commit is contained in:
Randy Mackay 2015-10-07 21:08:08 +09:00
parent d3066fcdad
commit 825abdbedc

View File

@ -84,7 +84,7 @@ void loop()
compass.learn_offsets(); compass.learn_offsets();
// capture min // capture min
const Vector3f &mag = compass.get_field(); const Vector3f &mag = compass.get_field_milligauss();
if( mag.x < min[0] ) if( mag.x < min[0] )
min[0] = mag.x; min[0] = mag.x;
if( mag.y < min[1] ) if( mag.y < min[1] )