segwayrmp_gui.h
Go to the documentation of this file.
1 #ifndef SEGWAYRMP_GUI_H
2 #define SEGWAYRMP_GUI_H
3 
4 #include <QtGui/QMainWindow>
5 #include <QtCore/QMutex>
6 
7 #include <SDL/SDL.h>
8 
9 #include <segwayrmp/segwayrmp.h>
10 
11 namespace Ui {
12 class MainWindow;
13 }
14 
15 class MainWindow : public QMainWindow
16 {
17  Q_OBJECT
18 
19 public slots:
20  void onConnectClicked();
21  void connectionTypeChanged(QString);
22  void rmpTypeChanged(QString);
23  void USBListUpdated();
24  void updateUSBList();
25 
26  void updateJoysticks();
27  void onJoystickChanged(int);
28  void commandPoll();
29 
30  void handleSegwayLog(QString);
31  void handleSegwayStatus(QString);
32 
33  void onResetIntegrators();
34  void onDisableMotors();
35  void onRequestTractor();
36  void onRequestBalance();
37  void onRequestPowerDown();
38  void onBalanceLockout();
39  void onBalanceUnlock();
40  void onSendConfig();
41 
42 signals:
43  void USBUpdateComplete();
44  void segwayLog(QString);
45  void segwayStatus(QString);
46 
47 public:
48  explicit MainWindow(QWidget *parent = 0);
49  ~MainWindow();
50 
51  void onSegwayLog(QString, const std::string&);
52  void onSegwayStatus(segwayrmp::SegwayStatus::Ptr);
53 
54 private:
55  Ui::MainWindow *ui;
56  bool connected_;
57  QVector<QString> usb_devices_;
61  SDL_Joystick * joystick_;
62  QMutex joy_mutex_;
63  bool running_;
64 
65  void updateUSBList_();
66 
67 protected:
68  void closeEvent(QCloseEvent*);
69 };
70 
71 #endif // SEGWAYRMP_GUI_H
bool connected_
Definition: segwayrmp_gui.h:56
QMutex joy_mutex_
Definition: segwayrmp_gui.h:62
segwayrmp::InterfaceType interface_type_
Definition: segwayrmp_gui.h:59
Ui::MainWindow * ui
Definition: segwayrmp_gui.h:55
boost::shared_ptr< SegwayStatus > Ptr
Definition: segwayrmp.h:325
QVector< QString > usb_devices_
Definition: segwayrmp_gui.h:57
segwayrmp::SegwayRMP * rmp_
Definition: segwayrmp_gui.h:58
segwayrmp::SegwayRMPType rmp_type_
Definition: segwayrmp_gui.h:60
SDL_Joystick * joystick_
Definition: segwayrmp_gui.h:61
void handleSegwayStatus(segwayrmp::SegwayStatus::Ptr &ss)


libsegwayrmp
Author(s): William Woodall
autogenerated on Mon Jun 10 2019 13:46:49