From 5f3c2bcd1112fa182890ee9d3fa76727afd90e91 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 7 Jan 2015 11:51:06 +0900 Subject: [PATCH] Copter: rename landing_gear.pde --- ArduCopter/{LandingGear.pde => landing_gear.pde} | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) rename ArduCopter/{LandingGear.pde => landing_gear.pde} (93%) diff --git a/ArduCopter/LandingGear.pde b/ArduCopter/landing_gear.pde similarity index 93% rename from ArduCopter/LandingGear.pde rename to ArduCopter/landing_gear.pde index 8dd66d5ee5..2a6e6f634d 100644 --- a/ArduCopter/LandingGear.pde +++ b/ArduCopter/landing_gear.pde @@ -2,31 +2,30 @@ // Run landing gear controller at 10Hz static void landinggear_update(){ - + // If landing gear control is active, run update function. if (g.ch7_option == AUX_SWITCH_LANDING_GEAR || g.ch8_option == AUX_SWITCH_LANDING_GEAR){ - + // last status (deployed or retracted) used to check for changes static bool last_deploy_status; - + // if we are doing an automatic landing procedure, force the landing gear to deploy. // To-Do: should we pause the auto-land procedure to give time for gear to come down? if (control_mode == LAND || (control_mode==RTL && rtl_state == Land) || (control_mode == AUTO && auto_mode == Auto_Land)){ landinggear.force_deploy(true); } - + landinggear.update(); - + // send event message to datalog if status has changed if (landinggear.deployed() != last_deploy_status){ - if (landinggear.deployed()){ + if (landinggear.deployed()) { Log_Write_Event(DATA_LANDING_GEAR_DEPLOYED); } else { Log_Write_Event(DATA_LANDING_GEAR_RETRACTED); } } - + last_deploy_status = landinggear.deployed(); } } -