Copter: landinggear_update formatting change

no functional change
This commit is contained in:
Randy Mackay 2017-08-04 15:04:18 +09:00
parent 106c1b4fde
commit 5a664bc348

View File

@ -4,8 +4,10 @@
// Run landing gear controller at 10Hz
void Copter::landinggear_update()
{
// If landing gear control is active, run update function.
if (check_if_auxsw_mode_used(AUXSW_LANDING_GEAR)){
// exit immediately if no landing gear switch is enabled
if (!check_if_auxsw_mode_used(AUXSW_LANDING_GEAR)) {
return;
}
// last status (deployed or retracted) used to check for changes, initialised to startup state of landing gear
static bool last_deploy_status = landinggear.deployed();
@ -20,7 +22,7 @@ void Copter::landinggear_update()
}
// send event message to datalog if status has changed
if (landinggear.deployed() != last_deploy_status){
if (landinggear.deployed() != last_deploy_status) {
if (landinggear.deployed()) {
Log_Write_Event(DATA_LANDING_GEAR_DEPLOYED);
} else {
@ -29,5 +31,4 @@ void Copter::landinggear_update()
}
last_deploy_status = landinggear.deployed();
}
}