From 9f8a34908aab5e76d7a10178f96bf6155101428e Mon Sep 17 00:00:00 2001 From: JesusBV20 Date: Tue, 16 Aug 2022 19:50:14 +0200 Subject: [PATCH] Cleaning the code --- src/widgets/map/gvf_trajectories/gvf_traj_sin.cpp | 2 +- src/widgets/map/mapwidget.cpp | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/widgets/map/gvf_trajectories/gvf_traj_sin.cpp b/src/widgets/map/gvf_trajectories/gvf_traj_sin.cpp index 0f4a7c98..94e80ecd 100644 --- a/src/widgets/map/gvf_trajectories/gvf_traj_sin.cpp +++ b/src/widgets/map/gvf_trajectories/gvf_traj_sin.cpp @@ -85,7 +85,7 @@ void GVF_traj_sin::genVField() { float bound_area = pow(dx,2) + pow(dy,2); // to scale the arrows emit DispatcherUi::get()->gvf_defaultFieldSettings(ac_id, bound_area, 25, 25); - xy_mesh = meshGrid(); //4*bound_area TODO: Fix auto scale method + xy_mesh = meshGrid(); foreach (const QPointF &point, xy_mesh) { double xs = (point.x() - a)*sin(course) - (point.y() - b)*cos(course); diff --git a/src/widgets/map/mapwidget.cpp b/src/widgets/map/mapwidget.cpp index 753a5f18..87779ac7 100644 --- a/src/widgets/map/mapwidget.cpp +++ b/src/widgets/map/mapwidget.cpp @@ -1227,11 +1227,8 @@ void MapWidget::onGVF(QString sender, pprzlink::Message msg) { // GVF_PARAMETRIC else if (msg.getDefinition().getName() == "GVF_PARAMETRIC") { QList phi = {0.0}; // Error signals - //float wb; msg.getField("traj", traj); - //msg.getField("s", direction); - //msg.getField("w", wb); msg.getField("p", param); msg.getField("phi", phi); @@ -1241,11 +1238,11 @@ void MapWidget::onGVF(QString sender, pprzlink::Message msg) { gvf_traj = new GVF_traj_trefoil(sender, param, phi, gvf_trajectories_config[sender]); break; } - case 1: { // Ellipse 3D (TODO) + case 1: { // Ellipse 3D gvf_traj = new GVF_traj_3D_ellipse(sender, param, phi, gvf_trajectories_config[sender]); break; } - case 2: { // Lissajous 3D (TODO) + case 2: { // Lissajous 3D gvf_traj = new GVF_traj_3D_lissajous(sender, param, phi, gvf_trajectories_config[sender]); break; }