Subversion Repositories FlightCtrl

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2506 - 1
/*#######################################################################################
2
Derkodieren eines RC Summen Signals
3
#######################################################################################*/
4
 
5
#ifndef _RC_H
6
#define _RC_H
7
 
8
#if defined (__AVR_ATmega644__)
9
#define TIMER_RELOAD_VALUE  250
10
#endif
11
 
12
#if defined (__AVR_ATmega644P__)
13
#define TIMER_RELOAD_VALUE  250
14
#endif
15
 
16
#define MAX_RC_IN  16+12+3+4 // 16ch + 12ser + 3stages + 4 reserved
17
 
18
extern void rc_sum_init (void);
19
 
20
extern volatile int PPM_in[MAX_RC_IN];
21
extern volatile int PPM_diff[MAX_RC_IN];  // das diffenzierte Stick-Signal
22
extern volatile unsigned char NewPpmData;
23
extern volatile char Channels,tmpChannels;
24
extern unsigned int PPM_Neutral;
25
 
26
//  0           -> frei bzw. ACT rssi
27
//  1 - 16      -> 1-16
28
// 17 - 28      -> 12 Serial channels
29
// 29           -> WP-Event kanal
30
// 30           -> -127
31
// 31           -> 0
32
// 32           -> 128
33
 
34
#define SERIAL_POTI_START 17
35
#define WP_EVENT_PPM_IN   29
36
#define PPM_IN_OFF        30
37
#define PPM_IN_MAX        31
38
#define PPM_IN_MID        32
39
 
40
#define FromNC_WP_EventChannel PPM_in[WP_EVENT_PPM_IN] // WP_EVENT-Channel-Value
41
 
42
#endif //_RC_H