mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 07:23:33 +08:00
Hack to make flow controll to compile
This commit is contained in:
@@ -268,6 +268,8 @@ flow_position_control_thread_main(int argc, char *argv[])
|
|||||||
/* get a local copy of local position */
|
/* get a local copy of local position */
|
||||||
orb_copy(ORB_ID(vehicle_local_position), vehicle_local_position_sub, &local_pos);
|
orb_copy(ORB_ID(vehicle_local_position), vehicle_local_position_sub, &local_pos);
|
||||||
|
|
||||||
|
// XXX fix this
|
||||||
|
#if 0
|
||||||
if (vstatus.state_machine == SYSTEM_STATE_AUTO)
|
if (vstatus.state_machine == SYSTEM_STATE_AUTO)
|
||||||
{
|
{
|
||||||
float manual_pitch = manual.pitch / params.rc_scale_pitch; // 0 to 1
|
float manual_pitch = manual.pitch / params.rc_scale_pitch; // 0 to 1
|
||||||
@@ -527,7 +529,7 @@ flow_position_control_thread_main(int argc, char *argv[])
|
|||||||
if(isfinite(manual.throttle))
|
if(isfinite(manual.throttle))
|
||||||
speed_sp.thrust_sp = manual.throttle;
|
speed_sp.thrust_sp = manual.throttle;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/* measure in what intervals the controller runs */
|
/* measure in what intervals the controller runs */
|
||||||
perf_count(mc_interval_perf);
|
perf_count(mc_interval_perf);
|
||||||
perf_end(mc_loop_perf);
|
perf_end(mc_loop_perf);
|
||||||
|
|||||||
@@ -218,6 +218,8 @@ int flow_position_estimator_thread_main(int argc, char *argv[])
|
|||||||
|
|
||||||
while (!thread_should_exit)
|
while (!thread_should_exit)
|
||||||
{
|
{
|
||||||
|
// XXX fix this
|
||||||
|
#if 0
|
||||||
if (sensors_ready)
|
if (sensors_ready)
|
||||||
{
|
{
|
||||||
/*This runs at the rate of the sensors */
|
/*This runs at the rate of the sensors */
|
||||||
@@ -273,6 +275,7 @@ int flow_position_estimator_thread_main(int argc, char *argv[])
|
|||||||
* -> accept sonar measurements after reaching calibration distance (values between 0.3m and 1.0m for some time)
|
* -> accept sonar measurements after reaching calibration distance (values between 0.3m and 1.0m for some time)
|
||||||
* -> minimum sonar value 0.3m
|
* -> minimum sonar value 0.3m
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!vehicle_liftoff)
|
if (!vehicle_liftoff)
|
||||||
{
|
{
|
||||||
if (vstatus.flag_system_armed && att_sp.thrust > params.minimum_liftoff_thrust && sonar_new > 0.3f && sonar_new < 1.0f)
|
if (vstatus.flag_system_armed && att_sp.thrust > params.minimum_liftoff_thrust && sonar_new > 0.3f && sonar_new < 1.0f)
|
||||||
@@ -437,6 +440,7 @@ int flow_position_estimator_thread_main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
counter++;
|
counter++;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("[flow position estimator] exiting.\n");
|
printf("[flow position estimator] exiting.\n");
|
||||||
|
|||||||
@@ -186,6 +186,7 @@ flow_speed_control_thread_main(int argc, char *argv[])
|
|||||||
|
|
||||||
while (!thread_should_exit)
|
while (!thread_should_exit)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
/* wait for first attitude msg to be sure all data are available */
|
/* wait for first attitude msg to be sure all data are available */
|
||||||
if (sensors_ready)
|
if (sensors_ready)
|
||||||
{
|
{
|
||||||
@@ -340,6 +341,7 @@ flow_speed_control_thread_main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("[flow speed control] ending now...\n");
|
printf("[flow speed control] ending now...\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user