Subversion Repositories FlightCtrl

Rev

Rev 2099 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1910 - 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 {
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;
19
 
20
extern ExternalControl_t externalControl;
21
extern uint8_t externalControlActive;
22
 
23
void EC_update(void);
24
int16_t* EC_getEATR(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);
31
 
32
#endif