Changeset 221 in flair-src


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

add us plot

Location:
trunk
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/RangeFinderPlot.cpp

    r214 r221  
    3535    : SendData(position, name, "RangeFinderPlot", 200) {
    3636  this->datas = datas;
    37 Warn("RangeFinderPlot::CopyDatas needs to be written\n");
     37
    3838  SetSendSize(datas->GetDataType().GetSize());
    3939
     
    5858
    5959void RangeFinderPlot::CopyDatas(char *buf) const {
    60   //datas->CopyDatas(buf);
     60  datas->CopyDatas(buf);
    6161}
    6262
  • trunk/lib/FlairSensorActuator/src/SimuUs.cpp

    r214 r221  
    3232namespace sensor {
    3333
     34//control part
    3435SimuUs::SimuUs(string name, uint32_t modelId,uint32_t deviceId,
    3536               uint8_t priority)
     
    4344}
    4445
     46//simulation part
    4547SimuUs::SimuUs(const IODevice *parent, string name,uint32_t modelId,uint32_t deviceId)
    4648    : Thread(parent, name, 0), UsRangeFinder(parent,name) {
  • trunk/lib/FlairSensorActuator/src/UsRangeFinder.cpp

    r214 r221  
    7373Tab *UsRangeFinder::GetPlotTab(void) const { return plot_tab; }
    7474
     75TabWidget *UsRangeFinder::GetTabWidget(void) const { return tab; }
     76
    7577void UsRangeFinder::UseDefaultPlot(void) {
    7678  if (tab == NULL) {
  • trunk/lib/FlairSensorActuator/src/UsRangeFinder.h

    r214 r221  
    105105  */
    106106  gui::Tab *GetPlotTab(void) const;
     107 
     108  /*!
     109  * \brief Tab widget
     110  *
     111  * \return tab widget
     112  */
     113  gui::TabWidget *GetTabWidget(void) const;
    107114
    108115  /*!
  • 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.