source: pacpussensors/trunk/Wifibot/ps3remote.h@ 127

Last change on this file since 127 was 99, checked in by nguyenhu, 9 years ago

compilation under linux with 0.2.X framework

File size: 1.2 KB
RevLine 
[21]1/*********************************************************************
2// created: 2012/03/01 - 14:06
3// filename: PS3remote.h
4//
5// author: Pierre Hudelaine
6// Copyright Heudiasyc UMR UTC/CNRS 7253
[99]7//
[21]8// version: $Id: $
9//
[22]10// purpose: Read the dualshock 3 buttons using bluetooth
[21]11//
12*********************************************************************/
13
14#ifndef PS3_REMOTE_H
15# define PS3_REMOTE_H
16
17# include <QApplication>
18# include <QThread>
[22]19# include <QTimer>
[99]20# include <QMutex>
[21]21
22# include "../Dualshock/controller.h"
[99]23# include "../PacpusSocket/PacpusUDPSocket.h"
[21]24
25namespace pacpus {
26
27 class PS3remote: public QThread {
28 Q_OBJECT
29
30 public:
31 PS3remote();
[99]32 PS3remote(PacpusUDPSocket *socket);
[21]33 ~PS3remote();
34 void run();
35 void stop();
[22]36 void setCmd(uint16_t Ls, uint16_t Rs, int leftF, int rightF);
37 void sendCmd();
38 void modePS3();
39 void modeChar();
40 void modeJoystick();
[99]41 void checkMode();
42
[21]43 private:
44 ShMem *shmem;
45 struct dualshockButtons_s * b;
46 QMutex mutex;
47 int quit;
[99]48 PacpusUDPSocket * socket_;
[22]49 QTimer * timer_;
50 char buf[4];
51
52 public Q_SLOTS:
53 void wifibotRemanentSending();
[21]54 };
55
56};
57
58#endif
Note: See TracBrowser for help on using the repository browser.