Subversion Repositories FlightCtrl

Rev

Rev 1812 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1812 Rev 1819
Line -... Line 1...
-
 
1
/******************************************************************************************************************
-
 
2
V0.82b-Arthur-P 2010-12-18
-
 
3
------------------------------------------------------------------------------------------------------------------
-
 
4
Version includes only support for external HEF4017 for FC1.x hardware, NOT for Twi2Ppm converters for ESCs.
-
 
5
 
-
 
6
2010-12-18 Chanded the if(Platinenversion < 20) statement within this file to correctly identify external HEF4017.
-
 
7
Arthur P. Modified to use several parameters for servo control:
-
 
8
User_Parameter4:
-
 
9
User_Parameter5:
-
 
10
User_Parameter6:
-
 
11
User_Parameter7:
-
 
12
User_Parameter8: Use external HEF4017 if bit 8 is set (>127). The remaining 7 bits are used
-
 
13
                 for the shutter cycle counter: the value is multiplied by 5 programmatically,
-
 
14
                                 resulting in steps of approx. 0.1sec. Minimum value to start using the
-
 
15
                                 interval timer is 10 (approx. 1 sec, or countervalue of 50). Note that this
-
 
16
                                 was originally done through user para 6.
-
 
17
******************************************************************************************************************/
1
/*#######################################################################################
18
/*#######################################################################################
2
Decodieren eines RC Summen Signals
19
Decodieren eines RC Summen Signals
3
#######################################################################################*/
20
#######################################################################################*/
4
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5
// + Copyright (c) Holger Buss, Ingo Busker
22
// + Copyright (c) Holger Buss, Ingo Busker
Line 73... Line 90...
73
                if(SenderOkay >= 195)  PPM_diff[index] = ((tmp - PPM_in[index]) / 3) * 3;
90
                if(SenderOkay >= 195)  PPM_diff[index] = ((tmp - PPM_in[index]) / 3) * 3;
74
                else PPM_diff[index] = 0;
91
                else PPM_diff[index] = 0;
75
                PPM_in[index] = tmp;
92
                PPM_in[index] = tmp;
76
                }
93
                }
77
            index++;
94
            index++;
-
 
95
/******************************************************************************************************************
-
 
96
Arthur P: Modified the code to check the value of parameter 8. If 128 or higher then a HEF4017 is
-
 
97
expected and will be used. Else J7 and J9 are seen as separate normal outputs.
-
 
98
if((PlatinenVersion < 20)
-
 
99
20100802 Inserted changes into v.0.82b code.
-
 
100
******************************************************************************************************************/    
-
 
101
 
78
                   if(PlatinenVersion < 20)
102
//      if(PlatinenVersion < 20)
-
 
103
 
-
 
104
        if((PlatinenVersion < 20) && (Parameter_UserParam8 < 128 ))
-
 
105
/******************************************************************************************************************
-
 
106
Arthur P: End of modification ot if statement. 
-
 
107
******************************************************************************************************************/    
79
            {  
108
            {  
80
             if(index == 5) J3High; else J3Low;  // Servosignal an J3 anlegen
109
             if(index == 5) J3High; else J3Low;  // Servosignal an J3 anlegen
81
             if(index == 6) J4High; else J4Low;  // Servosignal an J4 anlegen
110
             if(index == 6) J4High; else J4Low;  // Servosignal an J4 anlegen
82
             if(index == 7) J5High; else J5Low;  // Servosignal an J5 anlegen
111
             if(index == 7) J5High; else J5Low;  // Servosignal an J5 anlegen
83
                        }
112
                        }
Line 146... Line 175...
146
                if(SenderOkay >= 190)  ppm_diff[index] = ((tmp - ppm_in[index]) / 3) * 3;
175
                if(SenderOkay >= 190)  ppm_diff[index] = ((tmp - ppm_in[index]) / 3) * 3;
147
                else ppm_diff[index] = 0;
176
                else ppm_diff[index] = 0;
148
                ppm_in[index] = tmp;
177
                ppm_in[index] = tmp;
149
                }
178
                }
150
                        else ROT_ON;
179
                        else ROT_ON;
-
 
180
/******************************************************************************************************************
-
 
181
Arthur P: Modified the code to check the value of parameter 8. If 128 or higher then a HEF4017 is
-
 
182
expected and will be used. Else J7 and J9 are seen as separate normal outputs.
-
 
183
if((PlatinenVersion < 20)
-
 
184
20100802 Inserted changes into v.0.82b code.
-
 
185
******************************************************************************************************************/    
-
 
186
 
151
                   if(PlatinenVersion < 20)
187
//      if(PlatinenVersion < 20)
-
 
188
 
-
 
189
        if((PlatinenVersion < 20) && (Parameter_UserParam8 < 128 ))
-
 
190
/******************************************************************************************************************
-
 
191
Arthur P: End of modification ot if statement. 
-
 
192
******************************************************************************************************************/    
152
            {  
193
            {  
153
             if(index == 5) J3High; else J3Low;  // Servosignal an J3 anlegen
194
             if(index == 5) J3High; else J3Low;  // Servosignal an J3 anlegen
154
             if(index == 6) J4High; else J4Low;  // Servosignal an J4 anlegen
195
             if(index == 6) J4High; else J4Low;  // Servosignal an J4 anlegen
155
             if(index == 7) J5High; else J5Low;  // Servosignal an J5 anlegen
196
             if(index == 7) J5High; else J5Low;  // Servosignal an J5 anlegen
156
                        }
197
                        }