Skip to content
Snippets Groups Projects
Commit 758f6417 authored by Paul Beuchat's avatar Paul Beuchat
Browse files

bug solved

parent 1e59fb7c
No related branches found
No related tags found
No related merge requests found
......@@ -709,10 +709,7 @@ void MainWindow::on_customButton_3_clicked()
Setpoint MainWindow::correctSetpointBox(Setpoint setpoint, CrazyflieContext context)
{
Setpoint corrected_setpoint;
corrected_setpoint.x = setpoint.x;
corrected_setpoint.y = setpoint.y;
corrected_setpoint.z = setpoint.z;
corrected_setpoint.yaw = setpoint.yaw;
corrected_setpoint = setpoint;
if(setpoint.x > context.localArea.xmax)
corrected_setpoint.x = context.localArea.xmax;
......@@ -728,6 +725,7 @@ Setpoint MainWindow::correctSetpointBox(Setpoint setpoint, CrazyflieContext cont
if(setpoint.z < context.localArea.zmin)
corrected_setpoint.z = context.localArea.zmin;
return corrected_setpoint;
}
bool MainWindow::setpointInsideBox(Setpoint setpoint, CrazyflieContext context)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment