Last change
on this file since 25 was 22, checked in by phudelai, 11 years ago |
New control mode added + Security with the controller
|
File size:
1.2 KB
|
Rev | Line | |
---|
[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
|
---|
| 7 | //
|
---|
| 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>
|
---|
[21] | 20 |
|
---|
| 21 | # include "../Dualshock/controller.h"
|
---|
[22] | 22 | # include "../../../pacpusbase/PacpusSocket/PacpusSocket.h"
|
---|
[21] | 23 |
|
---|
| 24 | namespace pacpus {
|
---|
| 25 |
|
---|
| 26 | class PS3remote: public QThread {
|
---|
| 27 | Q_OBJECT
|
---|
| 28 |
|
---|
| 29 | public:
|
---|
| 30 | PS3remote();
|
---|
| 31 | PS3remote(PacpusSocket * socket);
|
---|
| 32 | ~PS3remote();
|
---|
| 33 | void run();
|
---|
| 34 | void stop();
|
---|
[22] | 35 | void setCmd(uint16_t Ls, uint16_t Rs, int leftF, int rightF);
|
---|
| 36 | void sendCmd();
|
---|
| 37 | void modePS3();
|
---|
| 38 | void modeChar();
|
---|
| 39 | void modeJoystick();
|
---|
| 40 | void checkMode();
|
---|
| 41 |
|
---|
[21] | 42 | private:
|
---|
| 43 | ShMem *shmem;
|
---|
| 44 | struct dualshockButtons_s * b;
|
---|
| 45 | QMutex mutex;
|
---|
| 46 | int quit;
|
---|
| 47 | PacpusSocket * socket_;
|
---|
[22] | 48 | QTimer * timer_;
|
---|
| 49 | char buf[4];
|
---|
| 50 |
|
---|
| 51 | public Q_SLOTS:
|
---|
| 52 | void wifibotRemanentSending();
|
---|
[21] | 53 | };
|
---|
| 54 |
|
---|
| 55 | };
|
---|
| 56 |
|
---|
| 57 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.