applications
lds_polar_graph
lds_polar_graph.h
Go to the documentation of this file.
1
/****************************************************************************
2
**
3
** Copyright (C) 2016 The Qt Company Ltd.
4
** Contact: https://www.qt.io/licensing/
5
**
6
** This file is part of the Qt Charts module of the Qt Toolkit.
7
**
8
** $QT_BEGIN_LICENSE:GPL$
9
** Commercial License Usage
10
** Licensees holding valid commercial Qt licenses may use this file in
11
** accordance with the commercial license agreement provided with the
12
** Software or, alternatively, in accordance with the terms contained in
13
** a written agreement between you and The Qt Company. For licensing terms
14
** and conditions see https://www.qt.io/terms-conditions. For further
15
** information use the contact form at https://www.qt.io/contact-us.
16
**
17
** GNU General Public License Usage
18
** Alternatively, this file may be used under the terms of the GNU
19
** General Public License version 3 or (at your option) any later version
20
** approved by the KDE Free Qt Foundation. The licenses are as published by
21
** the Free Software Foundation and appearing in the file LICENSE.GPL3
22
** included in the packaging of this file. Please review the following
23
** information to ensure the GNU General Public License requirements will
24
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
25
**
26
** $QT_END_LICENSE$
27
**
28
****************************************************************************/
29
30
#ifndef LDSPOLARGRAPH_H
31
#define LDSPOLARGRAPH_H
32
33
#include <QTimer>
34
#include <QtGui/QMouseEvent>
35
#include <QtCore/QDebug>
36
#include <QtCharts/QChartView>
37
#include <QtCharts/QPolarChart>
38
#include <QtCharts/QAbstractAxis>
39
#include <QtCharts/QValueAxis>
40
#include <QtCharts/QScatterSeries>
41
#include <QtCharts/QValueAxis>
42
#include <boost/asio.hpp>
43
#include <boost/array.hpp>
44
#include <string>
45
46
QT_CHARTS_USE_NAMESPACE
47
48
class
LdsPolarGraph
:
public
QChartView
49
{
50
Q_OBJECT
51
public
:
52
LdsPolarGraph
(QWidget *parent = 0);
53
~LdsPolarGraph
();
54
uint16_t*
poll
();
55
void
close
() {
shutting_down_
=
true
; }
56
57
private
Q_SLOTS:
58
void
loadData
();
59
60
private
:
61
QTimer
timer_
;
62
QPolarChart *
chart_
;
63
QScatterSeries *
series_
;
64
qreal
angular_min_
;
65
qreal
angular_max_
;
66
qreal
radial_min_
;
67
qreal
radial_max
;
68
boost::asio::io_service
io_
;
69
std::string
port_
;
70
uint32_t
baud_rate_
;
71
bool
shutting_down_
;
72
boost::asio::serial_port
serial_
;
73
uint16_t
motor_speed_
;
74
};
75
76
#endif
LdsPolarGraph::timer_
QTimer timer_
Definition:
lds_polar_graph.h:88
LdsPolarGraph::radial_min_
qreal radial_min_
Definition:
lds_polar_graph.h:93
LdsPolarGraph::LdsPolarGraph
LdsPolarGraph(QWidget *parent=0)
Definition:
lds_polar_graph.cpp:34
LdsPolarGraph::io_
boost::asio::io_service io_
Definition:
lds_polar_graph.h:95
LdsPolarGraph::port_
std::string port_
The serial port the driver is attached to.
Definition:
lds_polar_graph.h:96
LdsPolarGraph::series_
QScatterSeries * series_
Definition:
lds_polar_graph.h:90
LdsPolarGraph::loadData
void loadData()
Definition:
lds_polar_graph.cpp:90
LdsPolarGraph
Definition:
lds_polar_graph.h:48
LdsPolarGraph::motor_speed_
uint16_t motor_speed_
current motor speed as reported by the LFCD.
Definition:
lds_polar_graph.h:100
LdsPolarGraph::baud_rate_
uint32_t baud_rate_
The baud rate for the serial connection.
Definition:
lds_polar_graph.h:97
LdsPolarGraph::~LdsPolarGraph
~LdsPolarGraph()
Definition:
lds_polar_graph.cpp:84
LdsPolarGraph::shutting_down_
bool shutting_down_
Flag for whether the driver is supposed to be shutting down or not.
Definition:
lds_polar_graph.h:98
LdsPolarGraph::poll
uint16_t * poll()
Definition:
lds_polar_graph.cpp:105
LdsPolarGraph::angular_max_
qreal angular_max_
Definition:
lds_polar_graph.h:92
LdsPolarGraph::chart_
QPolarChart * chart_
Definition:
lds_polar_graph.h:89
LdsPolarGraph::serial_
boost::asio::serial_port serial_
Actual serial port object for reading/writing to the LFCD Laser Scanner.
Definition:
lds_polar_graph.h:99
LdsPolarGraph::angular_min_
qreal angular_min_
Definition:
lds_polar_graph.h:91
LdsPolarGraph::close
void close()
Definition:
lds_polar_graph.h:82
LdsPolarGraph::radial_max
qreal radial_max
Definition:
lds_polar_graph.h:94
hls-lfcd-lds-driver
Author(s): Pyo
, Darby Lim
, Gilbert
, Will Son
, JH Yang, SP Kong
autogenerated on Wed Mar 2 2022 00:21:20