Subversion Repositories FlightCtrl

Rev

Rev 1910 | Rev 2102 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1910 Rev 2099
Line 1... Line 1...
1
#ifndef _RC_H
1
#ifndef _RC_H
2
#define _RC_H
2
#define _RC_H
Line 3... Line 3...
3
 
3
 
4
#include <inttypes.h>
-
 
5
 
4
#include <inttypes.h>
Line 6... Line 5...
6
#define MAX_CHANNELS 10
5
#include "configuration.h"
7
 
6
 
Line 8... Line 7...
8
// Number of cycles a command must be repeated before commit.
7
// Number of cycles a command must be repeated before commit.
9
#define COMMAND_TIMER 200
8
#define COMMAND_TIMER 200
10
 
9
 
11
extern void RC_Init(void);
10
extern void RC_Init(void);
12
// the RC-Signal. todo: Not export any more.
11
// the RC-Signal. todo: Not export any more.
13
extern volatile int16_t PPM_in[MAX_CHANNELS];
12
extern volatile int16_t PPM_in[MAX_CHANNELS];
Line 14... Line 13...
14
// extern volatile int16_t PPM_diff[MAX_CHANNELS];      // the differentiated RC-Signal. Should that be exported??
13
// extern volatile int16_t PPM_diff[MAX_CHANNELS];      // the differentiated RC-Signal. Should that be exported??
15
extern volatile uint8_t NewPpmData; // 0 indicates a new recieved PPM Frame
14
extern volatile uint8_t NewPpmData; // 0 indicates a new recieved PPM Frame
16
extern volatile int16_t RC_Quality; // rc signal quality indicator (0 to 200)
15
extern volatile uint8_t RCQuality;  // rc signal quality indicator (0 to 200)
17
 
16
 
18
// defines for lookup staticParams.ChannelAssignment
17
// defines for lookup staticParams.ChannelAssignment
19
#define CH_ELEVATOR     0
18
#define CH_ELEVATOR     0
20
#define CH_AILERONS     1
19
#define CH_AILERONS         1
Line 21... Line 20...
21
#define CH_THROTTLE     2
20
#define CH_THROTTLE         2
22
#define CH_RUDDER       3
21
#define CH_RUDDER       3
23
#define CH_POTS         4
22
#define CH_POTS         4
24
#define POT_OFFSET      115
23
#define POT_OFFSET      120
25
 
24
 
26
/*
25
/*
27
 int16_t  RC_getPitch        (void);
26
 int16_t  RC_getPitch        (void);
Line 28... Line 27...
28
 int16_t  RC_getYaw          (void);
27
 int16_t  RC_getYaw          (void);
29
 int16_t  RC_getRoll         (void);
28
 int16_t  RC_getRoll         (void);
30
 uint16_t RC_getThrottle     (void);
29
 uint16_t RC_getThrottle     (void);
31
 uint8_t  RC_hasNewRCData    (void);
30
 uint8_t  RC_hasNewRCData    (void);
32
 */
31
 */
33
 
32
 
34
void RC_update(void);
33
// void RC_periodicTask(void);
-
 
34
void RC_periodicTaskAndPRTY(int16_t* PRTY);
-
 
35
uint8_t RC_getArgument(void);
35
int16_t* RC_getEATR(void);
36
uint8_t RC_getCommand(void);
-
 
37
int16_t RC_getVariable(uint8_t varNum);
36
uint8_t RC_getArgument(void);
38
void RC_calibrate(void);