Skip to content

Commit

Permalink
Call read and periodicIMUUpdate in combined IMU update
Browse files Browse the repository at this point in the history
  • Loading branch information
calebchalmers committed Nov 16, 2024
1 parent 430df4e commit 6b06ac8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ut-robomaster/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ static void updateIo(src::Drivers *drivers)
drivers->remote.read();
}

static void updateImu(src::Drivers *drivers)
{
drivers->bmi088.read();
drivers->bmi088.periodicIMUUpdate();
}

src::Drivers drivers;
RobotControl control{&drivers};

Expand All @@ -61,7 +67,7 @@ int main()

if (refreshTimer.execute())
{
PROFILE(drivers.profiler, drivers.bmi088.periodicIMUUpdate, ());
PROFILE(drivers.profiler, updateImu, (&drivers));
PROFILE(drivers.profiler, drivers.commandScheduler.run, ());
PROFILE(drivers.profiler, drivers.djiMotorTxHandler.encodeAndSendCanData, ());
PROFILE(drivers.profiler, drivers.terminalSerial.update, ());
Expand Down

0 comments on commit 6b06ac8

Please sign in to comment.