Plane: rename var to avoid a var with the name of a c++ keyword

This commit is contained in:
Michael du Breuil 2016-06-05 14:00:22 -07:00 committed by Andrew Tridgell
parent c54d553df1
commit fc3ab7b691

View File

@ -71,8 +71,8 @@ void Plane::read_control_switch()
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
if (g.override_channel > 0) {
// if the user has configured an override channel then check it
bool override = (hal.rcin->read(g.override_channel-1) >= PX4IO_OVERRIDE_PWM);
if (override && !px4io_override_enabled) {
bool override_requested = (hal.rcin->read(g.override_channel-1) >= PX4IO_OVERRIDE_PWM);
if (override_requested && !px4io_override_enabled) {
// we only update the mixer if we are not armed. This is
// important as otherwise we will need to temporarily
// disarm to change the mixer
@ -86,7 +86,7 @@ void Plane::read_control_switch()
// some way?
gcs_send_text(MAV_SEVERITY_WARNING, "PX4IO override enable failed");
}
} else if (!override && px4io_override_enabled) {
} else if (!override_requested && px4io_override_enabled) {
px4io_override_enabled = false;
RC_Channel_aux::enable_aux_servos();
gcs_send_text(MAV_SEVERITY_WARNING, "PX4IO override disabled");