Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
522 ligi 1
#ifndef FC_H
2
#define FC_H
127 ligi 3
 
4
#include <stdio.h>
483 ligi 5
#include <termios.h>
127 ligi 6
#include <sys/socket.h>
7
#include <sys/types.h>
8
#include <netinet/in.h>
9
#include <unistd.h>
140 ligi 10
#include <inttypes.h>
130 ligi 11
#include "bluetooth_handler.h"
12
#include "statistics.h"
127 ligi 13
 
14
struct ExternControl_s
15
{
16
  unsigned char Digital[2];   // (noch unbenutzt)
17
  unsigned char RemoteTasten; //(gab es schon für das virtuelle Display)
18
  signed char   Nick;
19
  signed char   Roll;
20
  signed char   Gier;
21
  unsigned char Gas;          //(es wird das Stick-Gas auf diesen Wert begrenzt; --> StickGas ist das Maximum)
22
  signed char   Higt;        //(Hoehenregler)
23
  unsigned char free;         // (unbenutzt)
24
  unsigned char Frame;        // (Bestätigung)
25
  unsigned char Config;
26
};
27
 
505 ligi 28
struct ExternEvent_s
29
{
30
  unsigned char key;
31
  unsigned char value[4];
32
 
33
};
34
 
140 ligi 35
struct str_DebugOut
36
{
37
 unsigned char Digital[2];
38
  //# signed int
39
 
40
uint16_t Analog[32];    // Debugwert//
41
};
42
 
522 ligi 43
 
44
struct str_VersionInfo
45
{
46
  unsigned char SWMajor;
47
  unsigned char SWMinor;
48
  unsigned char ProtoMajor;
49
  unsigned char ProtoMinor;
50
  unsigned char SWPatch;
51
  unsigned char Reserved[5];
52
};
53
 
54
 
140 ligi 55
struct str_DebugOut    DebugOut;
56
 
57
 
127 ligi 58
struct ExternControl_s  ExternControl;
505 ligi 59
struct ExternEvent_s  ExternEvent;
127 ligi 60
 
61
extern int mk_socket;
62
 
63
//int connect_mk_bluetooth(char dest[18]);
64
int connect_mk_localhost_socket(int port);
130 ligi 65
int connect_mk_bluetooth(char dest[18]);
483 ligi 66
int connect_mk_tty(char* tty_filename);
127 ligi 67
 
68
void SendOutData(unsigned char cmd,unsigned char modul, unsigned char *snd, unsigned char len);
130 ligi 69
int read_from_mk();
127 ligi 70
 
483 ligi 71
 
72
#define MAX_BUFF_LEN 150
73
 
74
extern unsigned char RxBuffer[MAX_BUFF_LEN ];
75
extern char PrintableRxBuffer[MAX_BUFF_LEN ];
130 ligi 76
extern int rx_last_length;
522 ligi 77
 
78
 
79
#endif