Subversion Repositories FlightCtrl

Rev

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

Rev Author Line No. Line
1910 - 1
#ifndef _RC_H
2
#define _RC_H
3
 
4
#include <inttypes.h>
2099 - 5
#include "configuration.h"
1910 - 6
 
7
// Number of cycles a command must be repeated before commit.
8
#define COMMAND_TIMER 200
9
 
10
extern void RC_Init(void);
11
// the RC-Signal. todo: Not export any more.
12
extern volatile int16_t PPM_in[MAX_CHANNELS];
13
// extern volatile int16_t PPM_diff[MAX_CHANNELS];      // the differentiated RC-Signal. Should that be exported??
14
extern volatile uint8_t NewPpmData; // 0 indicates a new recieved PPM Frame
2099 - 15
extern volatile uint8_t RCQuality;  // rc signal quality indicator (0 to 200)
1910 - 16
 
17
// defines for lookup staticParams.ChannelAssignment
18
#define CH_ELEVATOR     0
2099 - 19
#define CH_AILERONS         1
20
#define CH_THROTTLE         2
21
#define CH_RUDDER       3
2102 - 22
#define CH_MODESWITCH   4
1910 - 23
#define CH_POTS         4
24
 
2110 - 25
// These are a little individual for differnt R/C systems... trim for zero channel readings at zero
26
// stick, and trim VARIABLE_OFFSET for full variable range 0..255.
27
#define VARIABLE_OFFSET      128
28
#define RC_TRIM              23
29
// Set this for a full stick range of about -1024..1024.
30
#define RC_SCALING           2
1910 - 31
 
2099 - 32
// void RC_periodicTask(void);
2103 - 33
void RC_periodicTaskAndPRYT(int16_t* PRYT);
1910 - 34
uint8_t RC_getArgument(void);
35
uint8_t RC_getCommand(void);
36
int16_t RC_getVariable(uint8_t varNum);
37
void RC_calibrate(void);
38
uint8_t RC_getSignalQuality(void);
2099 - 39
uint8_t RC_getLooping(uint8_t looping);
40
#ifdef USE_MK3MAG
1910 - 41
uint8_t RC_testCompassCalState(void);
2099 - 42
#endif
1910 - 43
#endif //_RC_H