Subversion Repositories FlightCtrl

Rev

Rev 2341 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 ingob 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
 
1171 hbuss 12
#if defined (__AVR_ATmega644P__)
13
#define TIMER_RELOAD_VALUE  250
14
#endif
15
 
2341 holgerb 16
#define MAX_RC_IN  16+12+3+4 // 16ch + 12ser + 3stages + 4 reserved
17
 
1 ingob 18
extern void rc_sum_init (void);
19
 
2341 holgerb 20
extern volatile int PPM_in[MAX_RC_IN];
21
extern volatile int PPM_diff[MAX_RC_IN];  // das diffenzierte Stick-Signal
1 ingob 22
extern volatile unsigned char NewPpmData;
1268 hbuss 23
extern volatile char Channels,tmpChannels;
1933 holgerb 24
extern unsigned int PPM_Neutral;
1 ingob 25
 
2341 holgerb 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
2340 holgerb 33
 
34
#define SERIAL_POTI_START 17
35
#define WP_EVENT_PPM_IN   29
2341 holgerb 36
#define PPM_IN_OFF        30
2342 holgerb 37
#define PPM_IN_MAX        31
38
#define PPM_IN_MID        32
2340 holgerb 39
 
40
#define FromNC_WP_EventChannel PPM_in[WP_EVENT_PPM_IN] // WP_EVENT-Channel-Value
41
 
1 ingob 42
#endif //_RC_H