Subversion Repositories FlightCtrl

Rev

Rev 1821 | 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;
10
        int8_t pitch;
11
        int8_t roll;
12
        int8_t yaw;
13
        uint8_t throttle;
14
        int8_t height;
15
        uint8_t free; // Let's use that for commands now.
16
        uint8_t frame;
17
        uint8_t config; // Let's use that for arguemnts.
18
}__attribute__((packed)) ExternalControl_t;
1612 dongfang 19
 
20
extern ExternalControl_t externalControl;
21
extern uint8_t externalControlActive;
22
 
2039 - 23
void EC_periodicTask(void);
1821 - 24
int16_t* EC_getPRTY(void);
25
uint8_t EC_getArgument(void);
26
uint8_t EC_getCommand(void);
27
int16_t EC_getVariable(uint8_t varNum);
28
void EC_calibrate(void);
29
uint8_t EC_getSignalQuality(void);
30
void EC_setNeutral(void);
1612 dongfang 31
 
32
#endif