replace unnecessary perf_alloc_once usage

This commit is contained in:
Daniel Agar
2019-11-30 19:56:54 -05:00
parent cceec434f2
commit 97c6a28a70
4 changed files with 6 additions and 7 deletions
@@ -181,7 +181,7 @@ AirspeedModule::AirspeedModule():
// initialise parameters
update_params();
_perf_elapsed = perf_alloc_once(PC_ELAPSED, "airspeed_selector elapsed");
_perf_elapsed = perf_alloc(PC_ELAPSED, MODULE_NAME": elapsed");
}
AirspeedModule::~AirspeedModule()
@@ -189,7 +189,6 @@ AirspeedModule::~AirspeedModule()
ScheduleClear();
perf_free(_perf_elapsed);
}
int
+1 -1
View File
@@ -534,7 +534,7 @@ Ekf2::Ekf2(bool replay_mode):
ModuleParams(nullptr),
WorkItem(MODULE_NAME, px4::wq_configurations::att_pos_ctrl),
_replay_mode(replay_mode),
_ekf_update_perf(perf_alloc_once(PC_ELAPSED, MODULE_NAME": update")),
_ekf_update_perf(perf_alloc(PC_ELAPSED, MODULE_NAME": update")),
_params(_ekf.getParamHandle()),
_param_ekf2_min_obs_dt(_params->sensor_interval_min_ms),
_param_ekf2_mag_delay(_params->mag_delay_ms),
@@ -281,7 +281,7 @@ MulticopterPositionControl::MulticopterPositionControl(bool vtol) :
_vel_x_deriv(this, "VELD"),
_vel_y_deriv(this, "VELD"),
_vel_z_deriv(this, "VELD"),
_cycle_perf(perf_alloc_once(PC_ELAPSED, MODULE_NAME": cycle time"))
_cycle_perf(perf_alloc(PC_ELAPSED, MODULE_NAME": cycle time"))
{
if (vtol) {
// if vehicle is a VTOL we want to enable weathervane capabilities
+3 -3
View File
@@ -215,9 +215,9 @@ private:
simulator::Report<simulator::RawGPSData> _gps{1};
perf_counter_t _perf_gps{perf_alloc_once(PC_ELAPSED, "sim_gps_delay")};
perf_counter_t _perf_sim_delay{perf_alloc_once(PC_ELAPSED, "sim_network_delay")};
perf_counter_t _perf_sim_interval{perf_alloc(PC_INTERVAL, "sim_network_interval")};
perf_counter_t _perf_gps{perf_alloc(PC_ELAPSED, MODULE_NAME": gps delay")};
perf_counter_t _perf_sim_delay{perf_alloc(PC_ELAPSED, MODULE_NAME": network delay")};
perf_counter_t _perf_sim_interval{perf_alloc(PC_INTERVAL, MODULE_NAME": network interval")};
// uORB publisher handlers
uORB::Publication<battery_status_s> _battery_pub{ORB_ID(battery_status)};