mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-03 12:14:10 -04:00
uncrustify ArduCopter/commands.pde
This commit is contained in:
parent
a75d477071
commit
2d398aa663
@ -59,7 +59,7 @@ static struct Location get_cmd_with_index(int i)
|
||||
//temp.alt += home.alt;
|
||||
//}
|
||||
|
||||
if(temp.options & WP_OPTION_RELATIVE){
|
||||
if(temp.options & WP_OPTION_RELATIVE) {
|
||||
// If were relative, just offset from home
|
||||
temp.lat += home.lat;
|
||||
temp.lng += home.lng;
|
||||
@ -78,7 +78,7 @@ static void set_cmd_with_index(struct Location temp, int i)
|
||||
|
||||
// store home as 0 altitude!!!
|
||||
// Home is always a MAV_CMD_NAV_WAYPOINT (16)
|
||||
if (i == 0){
|
||||
if (i == 0) {
|
||||
temp.alt = 0;
|
||||
temp.id = MAV_CMD_NAV_WAYPOINT;
|
||||
}
|
||||
@ -109,9 +109,9 @@ static void set_cmd_with_index(struct Location temp, int i)
|
||||
|
||||
static int32_t get_RTL_alt()
|
||||
{
|
||||
if(g.RTL_altitude <= 0){
|
||||
if(g.RTL_altitude <= 0) {
|
||||
return current_loc.alt;
|
||||
}else if (g.RTL_altitude < current_loc.alt){
|
||||
}else if (g.RTL_altitude < current_loc.alt) {
|
||||
return current_loc.alt;
|
||||
}else{
|
||||
return g.RTL_altitude;
|
||||
@ -125,9 +125,9 @@ static int32_t get_RTL_alt()
|
||||
//********************************************************************************
|
||||
|
||||
/*
|
||||
This function sets the next waypoint command
|
||||
It precalculates all the necessary stuff.
|
||||
*/
|
||||
* This function sets the next waypoint command
|
||||
* It precalculates all the necessary stuff.
|
||||
*/
|
||||
|
||||
static void set_next_WP(struct Location *wp)
|
||||
{
|
||||
@ -136,7 +136,7 @@ static void set_next_WP(struct Location *wp)
|
||||
|
||||
// copy the current WP into the OldWP slot
|
||||
// ---------------------------------------
|
||||
if (next_WP.lat == 0 || command_nav_index <= 1){
|
||||
if (next_WP.lat == 0 || command_nav_index <= 1) {
|
||||
prev_WP = current_loc;
|
||||
}else{
|
||||
if (get_distance_cm(&filtered_loc, &next_WP) < 500)
|
||||
|
Loading…
Reference in New Issue
Block a user