Skip to content

Commit ffd5284

Browse files
committed
Enable Mag field mode during IMU Tilt compensation
1 parent a940106 commit ffd5284

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Firmware/RTK_Everywhere/Tilt.ino

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,17 @@ void beginTilt()
362362
result &= tiltSensor->sendCommand("MEMS_OUTPUT=UART1,OFF");
363363

364364
// Unknown new command for v2
365-
result &= tiltSensor->sendCommand("CORRECT_HOLDER=ENABLE"); // From tock firmware
365+
result &= tiltSensor->sendCommand("CORRECT_HOLDER=ENABLE"); // From stock firmware
366366

367367
// Trigger IMU on PPS from UM980
368368
result &= tiltSensor->sendCommand("SET_PPS_EDGE=RISING");
369369

370+
// Enable magnetic field mode
371+
// 'it is recommended to use the magnetic field initialization mode to speed up the initialization process'
372+
result &= tiltSensor->sendCommand("AHRS=ENABLE");
373+
374+
result &= tiltSensor->sendCommand("MAG_AUTO_SAVE=ENABLE");
375+
370376
if (result == true)
371377
{
372378
if (tiltSensor->saveConfiguration() == true)

0 commit comments

Comments
 (0)