5 #define NAVI_VERSION 7 //This allow sync with GUI
16 extern const uint8_t
boxids[];
44 extern int16_t
debug[4];
52 extern int16_t
angle[2];
62 extern int16_t
motor[8];
63 extern int16_t
servo[8];
75 #if defined(POWERMETER) || ( defined(LOG_VALUES) && (LOG_VALUES >= 3) )
76 #define PMOTOR_SUM 8 // index into pMeter[] for sum
77 extern uint32_t pMeter[PMOTOR_SUM + 1];
78 extern uint8_t pMeterV;
79 extern uint32_t pAlarm;
80 extern uint16_t powerValue;
83 #if defined(LCD_TELEMETRY)
84 extern uint8_t telemetry;
85 extern uint8_t telemetry_auto;
87 #ifdef LCD_TELEMETRY_STEP
88 extern char telemetryStepSequence[];
89 extern uint8_t telemetryStepIndex;
92 #if defined(LOG_VALUES) || defined(LCD_TELEMETRY)
93 extern uint16_t cycleTimeMax;
94 extern uint16_t cycleTimeMin;
95 extern int32_t BAROaltMax;
96 extern uint16_t GPS_speedMax;
97 extern uint16_t powerValueMaxMAH;
98 extern uint16_t wattsMax;
100 #if defined(LOG_VALUES) || defined(LCD_TELEMETRY) || defined(ARMEDTIMEWARNING) || defined(LOG_PERMANENT)
101 extern uint32_t armedTime;
107 extern gps_conf_struct GPS_conf;
123 extern uint32_t GPS_time;
125 extern uint8_t GPS_mode;
129 extern uint8_t GPS_saved_mission_state;
138 #define DESCENDING -1
139 #define REACHED_ALT 0
152 extern uint8_t land_detect;
158 extern mission_step_struct mission_step;
161 #define MISSION_WAYPOINT 1 //Set waypoint
162 #define MISSION_HOLD_UNLIM 2 //Poshold unlimited
163 #define MISSION_HOLD_TIME 3 //Hold for a predetermined time
164 #define MISSION_RTH 4 //Return to HOME
165 #define MISSION_SET_POI 5 //Set POINT of interest
166 #define MISSION_JUMP 6 //Jump to the given step (#times)
167 #define MISSION_SET_HEADING 7 //Set heading to a given orientation (parameter 1 is the waym 0-359 degree
168 #define MISSION_LAND 8 //Land at the given position
171 #define MISSION_FLAG_END 0xA5 //Flags that this is the last step
172 #define MISSION_FLAG_CRC_ERROR 0xFE //Returned WP had an EEPROM CRC error
173 #define MISSION_FLAG_HOME 0x01 //Returned WP is the home position
174 #define MISSION_FLAG_HOLD 0x02 //Returned WP is the hold position
175 #define MISSION_FLAG_DO_LAND 0x20 //Land when reached desired point (used in RTH)
176 #define MISSION_FLAG_NAV_IN_PROG 0xff //Navigation is in progress, returned wp is home
181 extern int16_t
nav[2];
187 #define POSHOLD_P .15
188 #define POSHOLD_I 0.0
189 #define POSHOLD_IMAX 20 // degrees
191 #define POSHOLD_RATE_P 3.4
192 #define POSHOLD_RATE_I 0.14 // Wind control
193 #define POSHOLD_RATE_D 0.053 // try 2 or 3 for POSHOLD_RATE 1
194 #define POSHOLD_RATE_IMAX 20 // degrees
198 #define NAV_I 0.33 // Wind control
199 #define NAV_D 0.083 //
200 #define NAV_IMAX 20 // degrees
209 #if defined(OPENLRSv2MULTI)
210 extern uint8_t pot_P,pot_I;
216 #if defined(INFLIGHT_ACC_CALIBRATION)
217 extern uint16_t InflightcalibratingA;
218 extern int16_t AccInflightCalibrationArmed;
219 extern uint16_t AccInflightCalibrationMeasurementDone;
220 extern uint16_t AccInflightCalibrationSavetoEEProm;
221 extern uint16_t AccInflightCalibrationActive;
224 #if defined(ARMEDTIMEWARNING)
225 extern uint32_t ArmedTimeWarningMicroSeconds;
228 #if defined(THROTTLE_ANGLE_CORRECTION)
229 extern int16_t throttleAngleCorrection;
const char boxnames[]
Definition: MultiWii.cpp:46
int32_t GPS_coord[2]
Definition: MultiWii.cpp:318
uint16_t calibratingG
Definition: MultiWii.cpp:162
uint8_t prv_gps_modes
Definition: MultiWii.cpp:335
volatile uint8_t spekFrameFlags
alt_t alt
Definition: MultiWii.cpp:180
uint16_t cycleTime
Definition: MultiWii.cpp:159
global_conf_t global_conf
Definition: MultiWii.cpp:303
conf_t conf
Definition: MultiWii.cpp:305
int8_t alt_change_flag
Definition: MultiWii.cpp:359
uint8_t NAV_error
Definition: MultiWii.cpp:334
void annexCode()
Definition: MultiWii.cpp:370
uint16_t intPowerTrigger1
Definition: MultiWii.cpp:239
uint8_t rcOptions[CHECKBOXITEMS]
Definition: MultiWii.cpp:165
analog_t analog
Definition: MultiWii.cpp:178
uint16_t calibratingA
Definition: MultiWii.cpp:160
uint16_t GPS_distanceToHome
Definition: MultiWii.cpp:324
int16_t sonarAlt
Definition: MultiWii.cpp:167
uint8_t rcSerialCount
Definition: MultiWii.cpp:276
int32_t GPS_prev[2]
Definition: MultiWii.cpp:321
int16_t lookupPitchRollRC[5]
Definition: MultiWii.cpp:277
uint32_t currentTime
Definition: MultiWii.cpp:157
uint8_t NAV_state
Definition: MultiWii.cpp:333
uint8_t NAV_paused_at
time in seconds to hold position
Definition: MultiWii.cpp:338
volatile uint32_t spekTimeLast
int16_t debug[4]
Definition: MultiWii.cpp:188
uint8_t next_step
Definition: MultiWii.cpp:340
uint16_t GPS_altitude
Definition: MultiWii.cpp:327
int16_t gyroZero[3]
Definition: MultiWii.cpp:174
int32_t GPS_home[2]
Definition: MultiWii.cpp:319
uint8_t vbatMin
Definition: MultiWii.cpp:164
int32_t GPS_directionToPoi
Definition: MultiWii.cpp:326
int32_t original_altitude
Definition: MultiWii.cpp:352
uint8_t alarmArray[ALRM_FAC_SIZE]
Definition: MultiWii.cpp:362
int16_t annex650_overrun_count
int32_t alt_to_hold
Definition: MultiWii.cpp:356
int16_t motor[8]
Definition: MultiWii.cpp:295
uint32_t alt_change_timer
Definition: MultiWii.cpp:358
flags_struct_t f
Definition: MultiWii.cpp:190
uint8_t GPS_numSat
Definition: MultiWii.cpp:323
#define RC_CHANS
Definition: def.h:1839
int16_t GPS_directionToHome
Definition: MultiWii.cpp:325
uint16_t lookupThrottleRC[11]
Definition: MultiWii.cpp:278
int16_t i2c_errors_count
Definition: MultiWii.cpp:209
int16_t GPS_angle[2]
Definition: MultiWii.cpp:317
int16_t rcSerial[8]
Definition: MultiWii.cpp:274
imu_t imu
Definition: MultiWii.cpp:176
uint32_t nav_timer_stop
GPS_checkbox items packed into 1 byte for checking GPS mode changes.
Definition: MultiWii.cpp:336
uint16_t GPS_speed
Definition: MultiWii.cpp:328
int16_t BaroPID
Definition: MultiWii.cpp:168
int16_t rcCommand[4]
Definition: MultiWii.cpp:275
int16_t axisPID[3]
Definition: MultiWii.cpp:294
volatile int16_t failsafeCnt
Definition: MultiWii.cpp:271
uint16_t calibratingB
Definition: MultiWii.cpp:161
uint16_t GPS_ground_course
Definition: MultiWii.cpp:330
int16_t failsafeEvents
Definition: MultiWii.cpp:270
int16_t rcData[RC_CHANS]
Definition: MultiWii.cpp:273
volatile unsigned long timer0_overflow_count
int16_t servo[8]
Definition: MultiWii.cpp:296
uint16_t nav_hold_time
common timer used in navigation (contains the desired stop time in millis()
Definition: MultiWii.cpp:337
uint16_t previousTime
Definition: MultiWii.cpp:158
int16_t nav[2]
Definition: MultiWii.cpp:348
int16_t jump_times
The mission step which is upcoming it equals with the mission_step stored in EEPROM.
Definition: MultiWii.cpp:341
void go_disarm()
Definition: MultiWii.cpp:806
int32_t GPS_poi[2]
Definition: MultiWii.cpp:322
int32_t AltHold
Definition: MultiWii.cpp:166
uint32_t alt_change
Definition: MultiWii.cpp:360
uint8_t GPS_update
Definition: MultiWii.cpp:329
int16_t magHold
Definition: MultiWii.cpp:163
int16_t errorAltitudeI
Definition: MultiWii.cpp:169
const uint8_t boxids[]
Definition: MultiWii.cpp:101
int32_t GPS_hold[2]
Definition: MultiWii.cpp:320
att_t att
Definition: MultiWii.cpp:182
int32_t target_altitude
Definition: MultiWii.cpp:354
int16_t headFreeModeHold
Definition: MultiWii.cpp:163