Page 333 - 2
P. 333

19, //"OSD_SWITCH;"
            #endif
            #if GPS
              20, //"MISSION;"
              21, //"LAND;"
            #endif
              };




            uint32_t currentTime = 0;
            uint16_t previousTime = 0;
            uint16_t cycleTime = 0;      // this is the number in micro second to achieve a full loop, it can
            differ a little and is taken into account in the PID loop
            uint16_t calibratingA = 0;  // the calibration is done in the main loop. Calibrating decreases at e
            ach cycle down to 0, then we enter in a normal mode.
            uint16_t calibratingB = 0;  // baro calibration = get new ground pressure value
            uint16_t calibratingG;
            int16_t magHold,headFreeModeHold; // [-180;+180]
            uint8_t vbatMin = VBATNOMINAL; // lowest battery voltage in 0.1V steps
            uint8_t rcOptions[CHECKBOXITEMS];
            int32_t AltHold; // in cm
            int16_t sonarAlt;
            int16_t BaroPID = 0;
            int16_t errorAltitudeI = 0;


            // **************
            // gyro+acc IMU
            // **************
            int16_t gyroZero[3] = {0,0,0};


            imu_t imu;


            analog_t analog;


            alt_t alt;


            att_t att;


            #if defined(ARMEDTIMEWARNING)
              uint32_t ArmedTimeWarningMicroSeconds = 0;
            #endif


            int16_t debug[4];


            flags_struct_t f;


                                                         - 333 -
   328   329   330   331   332   333   334   335   336   337   338