mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_Baro: fix instance shadowing
This commit is contained in:
parent
42516f7079
commit
0e895f5c74
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user