mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-01 21:48:28 -04:00
aed5787c1b
AC_PosControl::init_xy_controller() has been added to PosControl and is called by init_loiter_target. Hybrid is currently using set_loiter_target function to init the loiter controller. So we have to call init_xy_controller() by set_loiter_target function. What happens otherwise? In AC_PosControl::update_xy_controller, we update "now" with now = hal.scheduler->millis(); and, as _last_update_xy_ms has not been updated previously by init_xy_controller(), we just call init_xy_controller(). So, _dt_xy will be negative and used anyways in all the functions and PID called by update_xy_controller. That will avoid at least _accel_target.x/y to be set to 0 but I'm not sure for the high values, probably an I_term that is not reset and reached very high value. Or maybe a cast error somewhere... no clue at all |
||
---|---|---|
.. | ||
examples/AC_WPNav_test | ||
AC_Circle.cpp | ||
AC_Circle.h | ||
AC_WPNav.cpp | ||
AC_WPNav.h | ||
keywords.txt |