Subversion Repositories FlightCtrl

Rev

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

Rev 438 Rev 479
Line 50... Line 50...
50
// +  POSSIBILITY OF SUCH DAMAGE. 
50
// +  POSSIBILITY OF SUCH DAMAGE. 
51
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
51
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
52
#include "main.h"
52
#include "main.h"
Line 53... Line 53...
53
 
53
 
54
// Reservierung im EEPROM
54
// Reservierung im EEPROM
55
unsigned char EEPromArray[10] EEMEM;
55
unsigned char EEPromArray[5] EEMEM;
Line 56... Line 56...
56
struct mk_param_struct EEParameterArray[5] EEMEM;
56
struct mk_param_struct EEParameterArray[5] EEMEM;
Line 57... Line 57...
57
 
57
 
Line 151... Line 151...
151
       if(i>3)  DefaultKonstanten2(); // Kamera
151
       if(i>3)  DefaultKonstanten2(); // Kamera
152
       WriteParameterSet(i, (unsigned char *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE);
152
       WriteParameterSet(i, (unsigned char *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE);
153
      }
153
      }
154
          eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET], 3); // default-Setting
154
          eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET], 3); // default-Setting
155
          eeprom_write_byte(&EEPromArray[EEPROM_ADR_VALID], EE_DATENREVISION);
155
          eeprom_write_byte(&EEPromArray[EEPROM_ADR_VALID], EE_DATENREVISION);
-
 
156
         
-
 
157
          calib_acc();
156
        }
158
        }
Line 157... Line 159...
157
       
159
       
158
        ReadParameterSet(GetActiveParamSetNumber(), (unsigned char *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE);
160
        ReadParameterSet(GetActiveParamSetNumber(), (unsigned char *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE);
Line 166... Line 168...
166
        if(PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] > 100 && PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] > 100)
168
        if(PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] > 100 && PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] > 100)
167
        {
169
        {
168
                printf("\n\rKalibriere Kompass");
170
                printf("\n\rKalibriere Kompass");
169
                calib_MM3();
171
                calib_MM3();
170
        }
172
        }
171
/*     
173
       
172
        //Neutrallage kalibrieren?
174
        //Neutrallage kalibrieren?
173
        if(PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] > 100 && PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] < -100)
175
        if(PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] > 100 && PPM_in[EE_Parameter.Kanalbelegung[K_GIER]] < -100)
174
        {
176
        {
175
                printf("\n\rKalibriere Neutrallage");
177
                printf("\n\rKalibriere Neutrallage");
176
                calib_acc();
178
                calib_acc();
177
        }
179
        }
-
 
180
       
178
*/
181
       
179
        if(EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG)
182
        if(EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG)
180
         {
183
         {
181
           printf("\n\rAbgleich Luftdrucksensor..");
184
           printf("\n\rAbgleich Luftdrucksensor..");
182
           timer = SetDelay(1000);  
185
           timer = SetDelay(1000);  
183
       SucheLuftruckOffset();
186
       SucheLuftruckOffset();