source: flair-src/trunk/tools/FlairGCS/src/UsSensorPlot.h@ 313

Last change on this file since 313 was 269, checked in by Sanahuja Guillaume, 6 years ago

flairgcs:
speed up processing time when receiving datas from uav
triger watchdog while receiving datas from uav
(avoids connection lost in uav)

File size: 1.6 KB
RevLine 
[221]1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5#ifndef USSENSORPLOT_H_INCLUDED
6#define USSENSORPLOT_H_INCLUDED
7
8#include "DataRemote.h"
9#include <stdint.h>
10#include <QPen>
11
12class Layout;
13class QwtPlot;
14class QwtPlotCurve;
15class QwtPlotItem;
16class QMouseEvent;
17class QwtPlotMarker;
[259]18class QScrollBar;
[221]19
20class UsSensorPlot : public DataRemote {
21 Q_OBJECT
22
23public:
24 UsSensorPlot(Layout *parent, int row, int col, QString plot_name,
25 QString y_name, float ymin,float ymax, uint32_t nbSamples,QString datasType,bool enabled, int period);
26 ~UsSensorPlot();
27
28protected:
29 void mousePressEvent(QMouseEvent *event);
30
31private:
32 QwtPlot *plot;
[269]33 void XmlEvent(QDomElement *dom);
[221]34 void alignScales(void);
35 float xmin_orig, xmax_orig, ymin_orig, ymax_orig;
[259]36 QScrollBar* scrollbar;
[221]37
38 QwtPlotCurve *datas;
39 QwtPlotMarker *firstPeakStart,*firstPeakEnd,*secondPeakStart,*secondPeakEnd;
40 QString datasType;
41 double *dx;
[259]42
43 struct measure_t {
44 double *dy;
45 uint16_t firstPeakStartIndex;
46 uint16_t firstPeakEndIndex;
47 uint16_t secondPeakStartIndex;
48 uint16_t secondPeakEndIndex;
49 };
50 QList<measure_t> measures;
51
52
[221]53 uint32_t nbSamples;
[259]54 bool scrolling;
[221]55
56 bool eventFilter(QObject *, QEvent *);
57 void setYAxisScale(float ymin, float ymax);
58 void setXAxisScale(float xmin, float xmax);
59 void BufEvent(char **buf, int *buf_size, uint16_t period, bool big_endian);
[259]60 void plotMeasure(int index);
61
62 private slots:
63 void scrollBarMoved(int value);
[221]64};
65
66#endif // USSENSORPLOT_H_INCLUDED
Note: See TracBrowser for help on using the repository browser.