Skip to content

Commit

Permalink
Enable Mag field mode during IMU Tilt compensation
Browse files Browse the repository at this point in the history
  • Loading branch information
nseidle committed Apr 3, 2024
1 parent a940106 commit ffd5284
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Firmware/RTK_Everywhere/Tilt.ino
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,17 @@ void beginTilt()
result &= tiltSensor->sendCommand("MEMS_OUTPUT=UART1,OFF");

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

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

// Enable magnetic field mode
// 'it is recommended to use the magnetic field initialization mode to speed up the initialization process'
result &= tiltSensor->sendCommand("AHRS=ENABLE");

result &= tiltSensor->sendCommand("MAG_AUTO_SAVE=ENABLE");

if (result == true)
{
if (tiltSensor->saveConfiguration() == true)
Expand Down

0 comments on commit ffd5284

Please sign in to comment.