Created
April 2, 2023 08:11
-
-
Save reefwing/29e44f4f89aa17359e9f22dfc44300c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ReefwingLSM9DS1::setMagODR(MagODR rate) { | |
if (rate > ODR_80Hz) { | |
enableFastODR(true); | |
switch(rate) { | |
case MagODR::ODR_155Hz: // OM = 11, mode = ULTRA | |
setMagOperatingMode(ULTRA); | |
break; | |
case MagODR::ODR_300Hz: // OM = 10, mode = HIGH | |
setMagOperatingMode(HIGH); | |
break; | |
case MagODR::ODR_560Hz: // OM = 01, mode = MEDIUM | |
setMagOperatingMode(MEDIUM); | |
break; | |
case MagODR::ODR_1000Hz: // OM = 00 (OM default), mode = LOW | |
setMagOperatingMode(LOW); | |
break; | |
} | |
} | |
else { | |
enableFastODR(false); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment