0,0 → 1,97 |
/************************************************** |
* |
* |
* Riddim |
* Remote Interactive Digital Drone Interface Mashup |
* |
* 2008 Marcus -LiGi- Bueschleb |
* |
* |
**************************************************/ |
|
// for config file parsing |
#include <confuse.h> |
#include <string.h> |
|
// for understanding the FC |
#include "fc.h" |
#include "bluetooth_handler.h" |
|
#include <stdio.h> |
#include <stdlib.h> |
#include <fcntl.h> |
|
|
#include "lib/x52/x52.h" |
|
#include <sys/socket.h> |
|
|
#include <sys/time.h> |
#include <bluetooth/rfcomm.h> |
|
|
#include <linux/joystick.h> |
|
|
|
#include <errno.h> |
|
#include <sys/types.h> |
#include <netinet/in.h> |
#include <unistd.h>//for close() for socket |
|
|
int act_nick=0; |
int act_roll=0; |
int act_gier=0; |
int act_gas=0; |
int act_mode=0; |
|
#define JOY_DEV "/dev/input/js0" |
|
|
|
|
#define STATEID_SCANNING 0 |
#define STATEID_CONNECTING 1 |
|
#define BUTTON_SELECT 26 |
#define BUTTON_DOWN 28 |
#define BUTTON_UP 27 |
|
|
// #define AXIS_ROLL 0 |
// #define AXIS_NICK 1 |
// #define AXIS_GIER 5 |
// #define AXIS_GAS 2 |
|
|
|
// for x52 |
/* |
#define AXIS_ROLL 4 |
#define AXIS_NICK 3 |
#define AXIS_GIER 5 |
#define AXIS_GAS 2 |
|
#define INVERT_ROLL -1 |
#define INVERT_NICK -1 |
#define INVERT_GIER 1 |
#define INVERT_GAS -1 |
*/ |
|
#define AXIS_ROLL 0 |
#define AXIS_NICK 1 |
#define AXIS_GIER 3 |
#define AXIS_GAS 2 |
|
#define INVERT_ROLL 1 |
#define INVERT_NICK -1 |
#define INVERT_GIER 1 |
#define INVERT_GAS -1 |
|
|
#define INPUT_NONE 0 |
#define INPUT_JOYDEV 1 |
#define INPUT_EVDEV 2 |