mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 03:40:34 +08:00
uORB: Change cpuload topic int vehicle_cpuload
This avoids clashes with NuttX cpuload_s datatype. Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
@@ -162,7 +162,7 @@ void LoadMon::cpuload()
|
||||
const float interval_idletime = 1.0f;
|
||||
#endif
|
||||
|
||||
cpuload_s cpuload{};
|
||||
vehicle_cpuload_s cpuload{};
|
||||
#if defined(__PX4_LINUX)
|
||||
/* following calculation is based on free(1)
|
||||
* https://gitlab.com/procps-ng/procps/-/blob/master/proc/sysinfo.c */
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
|
||||
#include <px4_platform/cpuload.h>
|
||||
#include <uORB/Publication.hpp>
|
||||
#include <uORB/topics/cpuload.h>
|
||||
#include <uORB/topics/vehicle_cpuload.h>
|
||||
#include <uORB/topics/task_stack_info.h>
|
||||
|
||||
#if defined(__PX4_LINUX)
|
||||
@@ -90,7 +90,7 @@ private:
|
||||
|
||||
uORB::Publication<task_stack_info_s> _task_stack_info_pub{ORB_ID(task_stack_info)};
|
||||
#endif
|
||||
uORB::Publication<cpuload_s> _cpuload_pub {ORB_ID(cpuload)};
|
||||
uORB::Publication<vehicle_cpuload_s> _cpuload_pub {ORB_ID(vehicle_cpuload)};
|
||||
|
||||
#if defined(__PX4_LINUX)
|
||||
FILE *_proc_fd = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user