AP_Baro: fix instance shadowing

This commit is contained in:
khancyr 2017-07-24 10:57:05 +02:00 committed by Lucas De Marchi
parent 42516f7079
commit 0e895f5c74
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ AP_Baro_SITL::AP_Baro_SITL(AP_Baro &baro) :
{
sitl = (SITL::SITL *)AP_Param::find_object("SIM_");
if (sitl != nullptr) {
instance = _frontend.register_sensor();
_instance = _frontend.register_sensor();
hal.scheduler->register_timer_process(FUNCTOR_BIND(this, &AP_Baro_SITL::_timer, void));
}
}
@ -117,7 +117,7 @@ void AP_Baro_SITL::update(void)
return;
}
_copy_to_frontend(instance, _recent_press, _recent_temp);
_copy_to_frontend(_instance, _recent_press, _recent_temp);
_has_sample = false;
_sem->give();
}

View File

@ -17,7 +17,7 @@ protected:
void update_healthy_flag(uint8_t instance) override { _frontend.sensors[instance].healthy = true; }
private:
uint8_t instance;
uint8_t _instance;
SITL::SITL *sitl;
// barometer delay buffer variables