Subversion Repositories FlightCtrl

Rev

Rev 1960 | Rev 1968 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1960 Rev 1964
Line 18... Line 18...
18
// invert means: An "1" bit in digital debug data make a LOW on the output.
18
// invert means: An "1" bit in digital debug data make a LOW on the output.
19
#define DIGITAL_DEBUG_INVERT 0
19
#define DIGITAL_DEBUG_INVERT 0
Line 20... Line 20...
20
 
20
 
21
#define OUTPUT_HIGH(num)        {PORTC |=  (4 << (num));}
21
#define OUTPUT_HIGH(num)        {PORTC |=  (4 << (num));}
22
#define OUTPUT_LOW(num)         {PORTC &= ~(4 << (num));}
-
 
23
#define OUTPUT_SET(num, state)  {if (DIGITAL_DEBUG_INVERT){if(state) OUTPUT_LOW(num) else OUTPUT_HIGH(num)} else {if(state) OUTPUT_HIGH(num) else OUTPUT_LOW(num)}}
22
#define OUTPUT_LOW(num)         {PORTC &= ~(4 << (num));}
Line 24... Line 23...
24
#define OUTPUT_TOGGLE(num) (    {PORTC ^=  (4 << (num));}
23
#define OUTPUT_TOGGLE(num) (    {PORTC ^=  (4 << (num));}
25
 
24
 
26
/*
25
/*
Line 59... Line 58...
59
 
58
 
60
#define DEBUG_MAINLOOP_TIMER 1
59
#define DEBUG_MAINLOOP_TIMER 1
61
#define DEBUG_HEIGHT_DIFF 2
60
#define DEBUG_HEIGHT_DIFF    2
62
#define DEBUG_HOVERTHROTTLE 4
61
#define DEBUG_HOVERTHROTTLE  4
63
#define DEBUG_ACC0THORDER 8
62
#define DEBUG_ACC0THORDER    8
64
#define DEBUG_COMMANDREPEATED 16
63
#define DEBUG_SIGNAL        16
65
#define DEBUG_PRESSURERANGE 32
64
#define DEBUG_PRESSURERANGE 32
66
#define DEBUG_CLIP 64
65
#define DEBUG_CLIP          64
Line -... Line 66...
-
 
66
#define DEBUG_SENSORLIMIT  128
-
 
67
 
-
 
68
#define OUTPUTOPTIONS_INVERT_0         1
-
 
69
#define OUTPUTOPTIONS_INVERT_1         2
-
 
70
#define OUTPUTOPTIONS_FLASH_AT_BEEP    4
-
 
71
#define OUTPUTOPTIONS_USE_ONBOARD_LEDS 8
-
 
72
#define OUTPUTOPTIONS_TEST_LO         64
67
#define DEBUG_SENSORLIMIT 128
73
#define OUTPUTOPTIONS_TEST_HI        128 
68
 
74
 
69
/*
75
/*
70
 * Set to 0 for using outputs as the usual flashing lights.
76
 * Set to 0 for using outputs as the usual flashing lights.
71
 * Set to one of the DEBUG_... defines h for using the outputs as debug lights.
77
 * Set to one of the DEBUG_... defines h for using the outputs as debug lights.
Line 72... Line 78...
72
 */
78
 */
-
 
79
#define DIGITAL_DEBUG_MASK 0
73
#define DIGITAL_DEBUG_MASK 0
80
 
74
 
81
void output_init(void);
75
void output_init(void);
82
void outputSet(uint8_t num, uint8_t state);
76
void output_update(void);
83
void output_update(void);
77
void beep(uint16_t millis);
84
void beep(uint16_t millis);