mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 11:38:56 +08:00
Update RoverPositionControl.cpp
This commit is contained in:
committed by
Matthias Grob
parent
e9810e7be6
commit
9409646a89
@@ -113,7 +113,7 @@ RoverPositionControl::vehicle_control_mode_poll()
|
|||||||
void
|
void
|
||||||
RoverPositionControl::manual_control_setpoint_poll()
|
RoverPositionControl::manual_control_setpoint_poll()
|
||||||
{
|
{
|
||||||
if (true) {
|
if (_control_mode.flag_control_manual_enabled) {
|
||||||
if (_manual_control_setpoint_sub.copy(&_manual_control_setpoint)) {
|
if (_manual_control_setpoint_sub.copy(&_manual_control_setpoint)) {
|
||||||
float dt = math::constrain(hrt_elapsed_time(&_manual_setpoint_last_called) * 1e-6f, 0.0002f, 0.04f);
|
float dt = math::constrain(hrt_elapsed_time(&_manual_setpoint_last_called) * 1e-6f, 0.0002f, 0.04f);
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@ RoverPositionControl::Run()
|
|||||||
matrix::Vector2d current_position(_global_pos.lat, _global_pos.lon);
|
matrix::Vector2d current_position(_global_pos.lat, _global_pos.lon);
|
||||||
matrix::Vector3f current_velocity(_local_pos.vx, _local_pos.vy, _local_pos.vz);
|
matrix::Vector3f current_velocity(_local_pos.vx, _local_pos.vy, _local_pos.vz);
|
||||||
|
|
||||||
if (false) {
|
if (!_control_mode.flag_control_manual_enabled && _control_mode.flag_control_position_enabled) {
|
||||||
|
|
||||||
if (control_position(current_position, ground_speed, _pos_sp_triplet)) {
|
if (control_position(current_position, ground_speed, _pos_sp_triplet)) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user