Skip to content

Commit

Permalink
Debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
smarttowel committed Sep 1, 2020
1 parent b9d7150 commit 6efc258
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions asyncclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,17 @@ std::optional<QString> Registrator::registerMission()
request.set_deviceuuid(m_deviceUuid.toStdString());
request.set_flightrequestuuid(m_flightRequestUuid.toStdString());
auto waypoints = Vehicles::instance()->current()->f_mission->f_waypoints;
if(!qgetenv("DIGINAVIS_DEBUG").isEmpty())
std::cout << "WAYPOINTS" << std::endl;
for(int i = 0; i < waypoints->size(); i++) {
auto waypoint = dynamic_cast<Waypoint *>(waypoints->child(i));
if(waypoint) {
auto point = request.add_coordinates();
point->set_altitude(waypoint->f_altitude->value().toFloat());
point->set_latitude(waypoint->f_latitude->value().toFloat());
point->set_longitude(waypoint->f_longitude->value().toFloat());
if(!qgetenv("DIGINAVIS_DEBUG").isEmpty())
std::cout << point->latitude() << " " << point->longitude() << " " << point->altitude() << std::endl;
}
}

Expand Down

0 comments on commit 6efc258

Please sign in to comment.