Skip to content

Commit

Permalink
Print current heading on the display
Browse files Browse the repository at this point in the history
  • Loading branch information
gabryelreyes committed Nov 6, 2023
1 parent 3eec193 commit 8b9d292
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/APPConvoyLeader/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ void App::loop()
void App::reportOdometry()
{
Odometry& odometry = Odometry::getInstance();
IDisplay& display = Board::getInstance().getDisplay();
OdometryData payload;
int32_t xPos = 0;
int32_t yPos = 0;
Expand All @@ -140,6 +141,11 @@ void App::reportOdometry()
payload.orientation = odometry.getOrientation();

m_smpServer.sendData(m_serialMuxProtChannelIdOdometry, reinterpret_cast<uint8_t*>(&payload), sizeof(payload));

display.clear();
display.print("Heading:");
display.gotoXY(0U, 1U);
display.print(payload.orientation);
}

void App::reportSpeed()
Expand Down

0 comments on commit 8b9d292

Please sign in to comment.