Skip to content

Commit

Permalink
Sensors/Microstrain3DMGX3: Fix for writing calibration parameters to …
Browse files Browse the repository at this point in the history
…device.
  • Loading branch information
luis109 committed Sep 27, 2024
1 parent 9808c87 commit 55865c7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Sensors/Microstrain3DMGX3/Task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,13 @@ namespace Sensors
m_uart->setMinimumRead(max_data);
}

bool
resetUart()
{
delete(m_uart);
return onConnect();
}

void
consume(const IMC::MagneticField* msg)
{
Expand Down Expand Up @@ -484,6 +491,7 @@ namespace Sensors
setEntityState(IMC::EntityState::ESTA_NORMAL, Status::CODE_CALIBRATING);
inf(DTR("resetting device"));
poll(CMD_DEVICE_RESET, CMD_DEVICE_RESET_SIZE, 0, 0);
resetUart();
}
}
}
Expand Down

0 comments on commit 55865c7

Please sign in to comment.