logger: allocate _vehicle_status_sub & _parameter_update_sub on the logger thread

This makes sure the file descriptors are closed in the right thread.
Before on NuttX, when stopping the logger, orb unsubscribe failed due to
this.
This commit is contained in:
Beat Küng
2016-05-14 11:27:07 +02:00
committed by Lorenz Meier
parent 7d42a648f0
commit dde96dd4d7
2 changed files with 27 additions and 11 deletions
+2 -2
View File
@@ -95,8 +95,8 @@ private:
bool _task_should_exit = true;
char _log_dir[64];
uORB::Subscription<vehicle_status_s> _vehicle_status_sub {ORB_ID(vehicle_status)};
uORB::Subscription<parameter_update_s> _parameter_update_sub {ORB_ID(parameter_update)};
uORB::Subscription<vehicle_status_s> *_vehicle_status_sub = nullptr;
uORB::Subscription<parameter_update_s> *_parameter_update_sub = nullptr;
bool _enabled = false;
// statistics