2021-03-18 00:12:54 -03:00
|
|
|
#include "Blimp.h"
|
|
|
|
/*
|
2021-06-17 04:03:49 -03:00
|
|
|
* Init and run calls for land flight mode
|
2021-03-18 00:12:54 -03:00
|
|
|
*/
|
|
|
|
|
2021-06-17 04:03:49 -03:00
|
|
|
// Runs the main land controller
|
2021-03-18 00:12:54 -03:00
|
|
|
void ModeLand::run()
|
|
|
|
{
|
2021-06-23 11:17:34 -03:00
|
|
|
//Stop moving
|
|
|
|
motors->right_out = 0;
|
|
|
|
motors->front_out = 0;
|
|
|
|
motors->yaw_out = 0;
|
|
|
|
motors->down_out = 0;
|
2021-03-18 00:12:54 -03:00
|
|
|
}
|
|
|
|
|
2023-07-27 02:06:32 -03:00
|
|
|
// set_mode_land_failsafe - sets mode to LAND
|
|
|
|
// this is always called from a failsafe so we trigger notification to pilot
|
|
|
|
void Blimp::set_mode_land_failsafe(ModeReason reason)
|
2021-03-18 00:12:54 -03:00
|
|
|
{
|
|
|
|
set_mode(Mode::Number::LAND, reason);
|
|
|
|
|
|
|
|
// alert pilot to mode change
|
|
|
|
AP_Notify::events.failsafe_mode_change = 1;
|
|
|
|
}
|