-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
96 lines (80 loc) · 2.75 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/**************************************************************************************************
Copyright (C) 2017 Dr. Daniel L. Lau
This file is part of LAURobotWidget.
LAURobotWidget is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
LAURobotWidget is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with LAURobotWidget. If not, see <http://www.gnu.org/licenses/>.
**************************************************************************************************/
/* NOTES: -MM
*
* For Palette Motor Interactions, see laurobotwidget.cpp and laurobotwidget.h
*
* For Palette setup and config, see laupalettewidget.cpp and laupalettewidget.h
*
* For RPLidar setup and config, see laurplidarwidget.cpp and laurplidarwidget.h
*
* For ROS setup and config, see lautcprosportwidget.cpp and lautcprosportwidget.h
*
* For TCP Serial connection and settings, see lautcpserialportwidget.cpp and lautcpserialportwidget.h
*
* lauzeroconfwidget.cpp and lauzeroconfwidget.h should not be modified right now -MM
*
*/
#ifdef LAU_CLIENT
#include <QApplication>
#include "laukeyencewidget.h"
#include "laurplidarwidget.h"
#include "lauodomwidget.h"
//#include "laupolhumeswidget.h"
#else
#include <QCoreApplication>
#endif
#include "laurobotwidget.h"
#ifdef LAU_SERVER
#include "lautcpserialportwidget.h"
#include "laurplidarwidget.h"
#endif
#ifdef LAU_ROS
#include "lautcprosportwidget.h"
#endif
int main(int argc, char *argv[])
{
#ifdef LAU_CLIENT
QApplication a(argc, argv);
a.setQuitOnLastWindowClosed(true);
#else
QCoreApplication a(argc, argv);
#endif
a.setOrganizationName(QString("Lau Consulting Inc"));
a.setOrganizationDomain(QString("drhalftone.com"));
//LAUKeyenceWidget w(QString(""));
//LAURobotWidget w;
#ifdef LAU_ROS
ros::init(argc, argv, "lautcprosportwidget");
ros::start();
LAUTCPROSPortServer s(-1, QString("/realsense/odom"));
#endif
#ifdef LAU_SERVER
LAURobotServer s(-1, 9220);
LAURPLidarServer l(-1, 60000);
#endif
#ifdef LAU_CLIENT
// Serial Port setup
// LAURobotWidget w(QString(), (QWidget*)NULL);
// TCP Serial Remote setup
LAURobotWidget w(QString(), -1, (QWidget*)NULL);
LAURPLidarDialog l(QString(), -1, (QWidget*)NULL);
w.show();
l.show();
return a.exec();
#else
return (a.exec());
#endif
}