Changeset 221 in flair-src for trunk/tools/FlairGCS


Ignore:
Timestamp:
Feb 22, 2018, 3:38:55 PM (7 years ago)
Author:
Sanahuja Guillaume
Message:

add us plot

Location:
trunk/tools/FlairGCS
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/FlairGCS/CMakeLists.txt

    r204 r221  
    2323        src/UdtSocket.h
    2424        src/RangeFinderPlot.h
     25    src/UsSensorPlot.h
    2526        src/DataPlot2D.h
    2627        src/Picture.h
  • trunk/tools/FlairGCS/src/DataPlot2D.cpp

    r15 r221  
    272272      plot_data(data1, data2, i);
    273273    } else {
    274       printf("DataPlot1D::DrawDatas type non connu\n");
     274      printf("DataPlot2D::DrawDatas type non connu\n");
    275275    }
    276276  }
  • trunk/tools/FlairGCS/src/Layout.cpp

    r88 r221  
    1818#include "DataPlot2D.h"
    1919#include "RangeFinderPlot.h"
     20#include "UsSensorPlot.h"
    2021#include "Picture.h"
    2122#include "Map.h"
     
    180181    }
    181182  }
     183  if (type == "UsSensorPlot") {
     184    float ymin = dom.attribute("ymin").toFloat();
     185    float ymax = dom.attribute("ymax").toFloat();
     186    QString y_name = dom.attribute("y_name");
     187    int enabled = dom.attribute("enabled").toInt();
     188    int period = dom.attribute("period").toInt();
     189    QString type = dom.attribute("type");
     190    int samples = dom.attribute("samples").toInt();
     191    if (enabled == 1) {
     192      widget = new UsSensorPlot(this, row, col, name, y_name,
     193                              ymin, ymax, samples,type,true, period);
     194    } else {
     195      widget = new UsSensorPlot(this, row, col, name,  y_name,
     196                              ymin, ymax, samples,type,false, 100);
     197    }
     198  }
    182199  if (type == "RangeFinderPlot") {
    183200    float xmin = dom.attribute("xmin").toFloat();
Note: See TracChangeset for help on using the changeset viewer.