mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-02 22:18:29 -04:00
Copter: landinggear_update formatting change
no functional change
This commit is contained in:
parent
106c1b4fde
commit
5a664bc348
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user