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

Last change on this file since 21 was 21, checked in by phudelai, 11 years ago

New component for the wifibot and the dualshock 3

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