mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 09:28:31 -04:00
APM: fixed default flap speed
the default of 255 translates to -1 as a AP_Int8, so use zero to mean no flaps
This commit is contained in:
parent
67f076a9db
commit
7d9e4a7559
@ -398,9 +398,9 @@ static void set_servos(void)
|
||||
} else {
|
||||
flapSpeedSource = g.throttle_cruise;
|
||||
}
|
||||
if ( flapSpeedSource > g.flap_1_speed) {
|
||||
if ( g.flap_1_speed != 0 && flapSpeedSource > g.flap_1_speed) {
|
||||
g_rc_function[RC_Channel_aux::k_flap_auto]->servo_out = 0;
|
||||
} else if (flapSpeedSource > g.flap_2_speed) {
|
||||
} else if (g.flap_2_speed != 0 && flapSpeedSource > g.flap_2_speed) {
|
||||
g_rc_function[RC_Channel_aux::k_flap_auto]->servo_out = g.flap_1_percent;
|
||||
} else {
|
||||
g_rc_function[RC_Channel_aux::k_flap_auto]->servo_out = g.flap_2_percent;
|
||||
|
@ -317,13 +317,13 @@
|
||||
# define FLAP_1_PERCENT 0
|
||||
#endif
|
||||
#ifndef FLAP_1_SPEED
|
||||
# define FLAP_1_SPEED 255
|
||||
# define FLAP_1_SPEED 0
|
||||
#endif
|
||||
#ifndef FLAP_2_PERCENT
|
||||
# define FLAP_2_PERCENT 0
|
||||
#endif
|
||||
#ifndef FLAP_2_SPEED
|
||||
# define FLAP_2_SPEED 255
|
||||
# define FLAP_2_SPEED 0
|
||||
#endif
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// FLIGHT_MODE
|
||||
|
Loading…
Reference in New Issue
Block a user