Skip to content

Commit

Permalink
Merge pull request #2321 from labtoast/fix-autopilot-server-example
Browse files Browse the repository at this point in the history
examples: fix autopilot_server arming issue
  • Loading branch information
julianoes committed May 31, 2024
2 parents 182dd32 + f35f9bd commit 907ff91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/autopilot_server/autopilot_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ int main(int argc, char** argv)
TelemetryServer::RawGps rawGps{
0, 55.953251, -3.188267, 0, NAN, NAN, 0, NAN, 0, 0, 0, 0, 0, 0};
TelemetryServer::GpsInfo gpsInfo{11, TelemetryServer::FixType::Fix3D};
TelemetryServer::Battery battery;

// Publish home already, so that it is available.
telemServer.publish_home(position);
Expand Down Expand Up @@ -138,6 +139,8 @@ int main(int argc, char** argv)
std::this_thread::sleep_for(std::chrono::seconds(1));

// Publish the telemetry
telemServer.publish_home(position);
telemServer.publish_sys_status(battery, true, true, true, true, true);
telemServer.publish_position(position, velocity, heading);
telemServer.publish_position_velocity_ned(positionVelocityNed);
telemServer.publish_raw_gps(rawGps, gpsInfo);
Expand Down

0 comments on commit 907ff91

Please sign in to comment.