Subversion Repositories FlightCtrl

Rev

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

Rev Author Line No. Line
1612 dongfang 1
// Or does this simply belong in uart0.h??
2
#ifndef _EXTERNALCONTROL_H
3
#define _EXTERNALCONTROL_H
4
 
5
#include<inttypes.h>
6
 
7
typedef struct {
1821 - 8
        uint8_t digital[2];
9
        uint8_t remoteButtons;
2189 - 10
        int8_t  pitch;
11
        int8_t  roll;
12
        int8_t  yaw;
1821 - 13
        uint8_t throttle;
2189 - 14
        int8_t  height;
15
        uint8_t command; // Let's use that for commands now.
1821 - 16
        uint8_t frame;
2189 - 17
        uint8_t argument; // Let's use that for arguemnts.
1821 - 18
}__attribute__((packed)) ExternalControl_t;
1612 dongfang 19
 
20
extern ExternalControl_t externalControl;
2189 - 21
extern volatile uint8_t externalControlActive;
1612 dongfang 22
 
2189 - 23
void EC_periodicTaskAndRPTY(int16_t* RPTY);
1821 - 24
uint8_t EC_getArgument(void);
25
uint8_t EC_getCommand(void);
26
int16_t EC_getVariable(uint8_t varNum);
27
void EC_calibrate(void);
28
uint8_t EC_getSignalQuality(void);
29
void EC_setNeutral(void);
1612 dongfang 30
 
31
#endif