mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 08:55:51 +08:00
Warn if GUIDANCE_INDI_RC_DEBUG is true
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
<module name="guidance" type="indi">
|
<module name="guidance" type="indi">
|
||||||
<define name="GUIDANCE_INDI_SPECIFIC_FORCE_GAIN" value="-500.0"/>
|
<define name="GUIDANCE_INDI_SPECIFIC_FORCE_GAIN" value="-500.0"/>
|
||||||
<define name="GUIDANCE_INDI_THRUST_DYNAMICS" value="0.1"/>
|
<define name="GUIDANCE_INDI_THRUST_DYNAMICS" value="0.1"/>
|
||||||
<define name="GUIDANCE_INDI_RC_DEBUG" value="TRUE"/>
|
<define name="GUIDANCE_INDI_RC_DEBUG" value="FALSE"/>
|
||||||
</module>
|
</module>
|
||||||
</firmware>
|
</firmware>
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,8 @@ void guidance_indi_run(bool in_flight, int32_t heading) {
|
|||||||
sp_accel.y = (speed_sp_y - stateGetSpeedNed_f()->y) * guidance_indi_speed_gain;
|
sp_accel.y = (speed_sp_y - stateGetSpeedNed_f()->y) * guidance_indi_speed_gain;
|
||||||
sp_accel.z = (speed_sp_z - stateGetSpeedNed_f()->z) * guidance_indi_speed_gain;
|
sp_accel.z = (speed_sp_z - stateGetSpeedNed_f()->z) * guidance_indi_speed_gain;
|
||||||
|
|
||||||
#ifdef GUIDANCE_INDI_RC_DEBUG
|
#if GUIDANCE_INDI_RC_DEBUG
|
||||||
|
#warning "GUIDANCE_INDI_RC_DEBUG lets you control the accelerations via RC, but disables autonomous flight!"
|
||||||
//for rc control horizontal, rotate from body axes to NED
|
//for rc control horizontal, rotate from body axes to NED
|
||||||
float psi = stateGetNedToBodyEulers_f()->psi;
|
float psi = stateGetNedToBodyEulers_f()->psi;
|
||||||
float rc_x = -(radio_control.values[RADIO_PITCH]/9600.0)*8.0;
|
float rc_x = -(radio_control.values[RADIO_PITCH]/9600.0)*8.0;
|
||||||
@@ -193,7 +194,7 @@ void guidance_indi_run(bool in_flight, int32_t heading) {
|
|||||||
thrust_in = thrust_filt.o[0] + euler_cmd.z*thrust_in_specific_force_gain;
|
thrust_in = thrust_filt.o[0] + euler_cmd.z*thrust_in_specific_force_gain;
|
||||||
Bound(thrust_in, 0, 9600);
|
Bound(thrust_in, 0, 9600);
|
||||||
|
|
||||||
#ifdef GUIDANCE_INDI_RC_DEBUG
|
#if GUIDANCE_INDI_RC_DEBUG
|
||||||
if(radio_control.values[RADIO_THROTTLE]<300) {
|
if(radio_control.values[RADIO_THROTTLE]<300) {
|
||||||
thrust_in = 0;
|
thrust_in = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user