Rev 2125 | Rev 2132 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2125 | Rev 2130 | ||
---|---|---|---|
Line 53... | Line 53... | ||
53 | paramSet_readOrDefault(); |
53 | paramSet_readOrDefault(); |
Line 54... | Line 54... | ||
54 | 54 | ||
55 | // enable interrupts global |
55 | // enable interrupts global |
Line 56... | Line -... | ||
56 | sei(); |
- | |
57 | - | ||
58 | printf("\n\r==================================="); |
- | |
59 | printf("\n\rFlightControl"); |
- | |
60 | printf("\n\rHardware: Custom"); |
- | |
61 | printf("\n\r CPU: Atmega644"); |
- | |
62 | if (CPUType == ATMEGA644P) |
- | |
63 | printf("p"); |
- | |
64 | printf("\n\rSoftware: V%d.%d%c",VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH + 'a'); |
- | |
65 | printf("\n\r==================================="); |
- | |
66 | - | ||
67 | // Wait for a short time (otherwise the RC channel check won't work below) |
- | |
68 | // timer = SetDelay(500); |
- | |
69 | // while(!CheckDelay(timer)); |
- | |
70 | - | ||
71 | // Instead, while away the time by flashing the 2 outputs: |
- | |
72 | // First J16, then J17. Makes it easier to see which is which. |
- | |
73 | timer = setDelay(200); |
- | |
74 | outputSet(0,1); |
- | |
75 | GRN_OFF; |
- | |
76 | RED_ON; |
- | |
77 | while (!checkDelay(timer)) |
- | |
78 | ; |
- | |
79 | - | ||
80 | timer = setDelay(200); |
- | |
81 | outputSet(0, 0); |
- | |
82 | outputSet(1, 1); |
- | |
83 | RED_OFF; |
- | |
84 | GRN_ON; |
- | |
85 | while (!checkDelay(timer)) |
- | |
86 | ; |
- | |
87 | - | ||
88 | timer = setDelay(200); |
- | |
89 | while (!checkDelay(timer)) |
- | |
90 | ; |
- | |
91 | outputSet(1,0); |
- | |
92 | GRN_OFF; |
- | |
93 | - | ||
94 | printf("\n\r==================================="); |
- | |
95 | - | ||
96 | #ifdef USE_NAVICTRL |
- | |
97 | printf("\n\rSupport for NaviCtrl"); |
- | |
98 | #endif |
- | |
99 | - | ||
100 | #ifdef USE_DIRECT_GPS |
- | |
101 | printf("\n\rDirect (no NaviCtrl) navigation"); |
- | |
102 | #endif |
56 | sei(); |
Line 103... | Line 57... | ||
103 | 57 | ||
104 | controlMixer_setNeutral(); |
58 | controlMixer_setNeutral(); |
Line 105... | Line 59... | ||
105 | 59 | ||
106 | // Cal. attitude sensors and reset integrals. |
60 | // Cal. attitude sensors and reset integrals. |
Line -... | Line 61... | ||
- | 61 | attitude_setNeutral(); |
|
107 | attitude_setNeutral(); |
62 | |
Line 108... | Line -... | ||
108 | - | ||
109 | // Init flight parameters |
- | |
110 | // flight_setNeutral(); |
63 | // Init flight parameters |
111 | 64 | // flight_setNeutral(); |
|
112 | beep(2000); |
65 | |
Line 113... | Line 66... | ||
113 | 66 | // This is not a busy-wait operation and should be OK. |
|
114 | printf("\n\n\r"); |
67 | beep(2000); |