mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 13:03:34 +08:00
create temperature_compensation module
- this is a new module for temperature compensation that consolidates the functionality previously handled in the sensors module (calculating runtime thermal corrections) and the events module (online thermal calibration) - by collecting this functionality into a single module we can optionally disable it on systems where it's not used and save some flash (if disabled at build time) or memory (disabled at run time)
This commit is contained in:
@@ -40,14 +40,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "subscriber_handler.h"
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
#include <uORB/PublicationQueued.hpp>
|
||||
#include <uORB/Subscription.hpp>
|
||||
#include <uORB/topics/battery_status.h>
|
||||
#include <uORB/topics/cpuload.h>
|
||||
#include <uORB/topics/led_control.h>
|
||||
#include <uORB/topics/vehicle_attitude.h>
|
||||
#include <uORB/topics/vehicle_status.h>
|
||||
#include <uORB/topics/vehicle_status_flags.h>
|
||||
|
||||
@@ -60,7 +60,7 @@ class StatusDisplay
|
||||
{
|
||||
public:
|
||||
|
||||
StatusDisplay(const events::SubscriberHandler &subscriber_handler);
|
||||
StatusDisplay();
|
||||
|
||||
/** regularily called to handle state updates */
|
||||
void process();
|
||||
@@ -81,11 +81,11 @@ protected:
|
||||
void publish();
|
||||
|
||||
// TODO: review if there is a better variant that allocates this in the memory
|
||||
struct battery_status_s _battery_status = {};
|
||||
struct cpuload_s _cpu_load = {};
|
||||
struct vehicle_status_s _vehicle_status = {};
|
||||
struct vehicle_status_flags_s _vehicle_status_flags = {};
|
||||
struct vehicle_attitude_s _vehicle_attitude = {};
|
||||
uORB::SubscriptionData<battery_status_s> _battery_status_sub{ORB_ID(battery_status)};
|
||||
uORB::SubscriptionData<cpuload_s> _cpu_load_sub{ORB_ID(cpuload)};
|
||||
uORB::SubscriptionData<vehicle_status_s> _vehicle_status_sub{ORB_ID(vehicle_status)};
|
||||
uORB::SubscriptionData<vehicle_status_flags_s> _vehicle_status_flags_sub{ORB_ID(vehicle_status_flags)};
|
||||
uORB::SubscriptionData<vehicle_attitude_s> _vehicle_attitude_sub{ORB_ID(vehicle_attitude)};
|
||||
|
||||
struct led_control_s _led_control = {};
|
||||
|
||||
@@ -99,7 +99,6 @@ private:
|
||||
|
||||
uORB::PublicationQueued<led_control_s> _led_control_pub{ORB_ID(led_control)};
|
||||
|
||||
const events::SubscriberHandler &_subscriber_handler;
|
||||
};
|
||||
|
||||
} /* namespace status */
|
||||
|
||||
Reference in New Issue
Block a user