APMrover2: fix indentation leading to compiler warning

GCC 6 has a new warning about misleading indentation:

../../APMrover2/system.cpp: In member function ‘void Rover::set_mode(mode)’:
../../APMrover2/system.cpp:272:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
     if (control_mode == AUTO)
     ^~
../../APMrover2/system.cpp:275:2: note: ...this statement, but the^Bn latter is misleadingly indented as if it is guarded by the ‘if’
  control_mode = mode;
  ^~~~~~~~~~~~

The issue here is that we are mixing tabs and spaces. Remove tabs and re-indent
the code.
This commit is contained in:
Lucas De Marchi 2016-05-16 14:04:10 -03:00
parent 7af888633d
commit 368a72044c

View File

@ -269,8 +269,9 @@ void Rover::set_mode(enum mode mode)
}
// If we are changing out of AUTO mode reset the loiter timer
if (control_mode == AUTO)
if (control_mode == AUTO) {
loiter_time = 0;
}
control_mode = mode;
throttle_last = 0;
@ -282,8 +283,7 @@ void Rover::set_mode(enum mode mode)
auto_triggered = false;
}
switch(control_mode)
{
switch(control_mode) {
case MANUAL:
case HOLD:
case LEARNING: