44 #include <px4_platform_common/px4_config.h> 45 #include <px4_platform_common/getopt.h> 46 #include <px4_platform_common/module.h> 47 #include <px4_platform_common/module_params.h> 48 #include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp> 53 #include <mathlib/mathlib.h> 55 #define CONTROLLER_PERIOD_DEFAULT 100000 64 class Heater :
public ModuleBase<Heater>,
public ModuleParams,
public px4::ScheduledWorkItem
86 static int print_usage(
const char *reason =
nullptr);
188 (ParamFloat<px4::params::SENS_IMU_TEMP_I>) _param_sens_imu_temp_i,
189 (ParamFloat<px4::params::SENS_IMU_TEMP_P>) _param_sens_imu_temp_p,
190 (ParamInt<px4::params::SENS_TEMP_ID>) _param_sens_temp_id,
191 (ParamFloat<px4::params::SENS_IMU_TEMP>) _param_sens_imu_temp
static int custom_command(int argc, char *argv[])
main Main entry point to the module that should be called directly from the module's main method...
uORB::Subscription _sensor_accel_sub
__EXPORT int heater_main(int argc, char *argv[])
IMU Heater Controller driver used to maintain consistent temparature at the IMU.
uORB::Subscription _parameter_update_sub
int controller_period(char *argv[])
Sets and/or reports the heater controller time period value in microseconds.
float temperature_setpoint(char *argv[])
Sets and/or reports the heater target temperature.
int _controller_time_on_usec
void initialize_topics()
Called once to initialize uORB topics.
float proportional(char *argv[])
Sets and/or reports the heater controller proportional gain value.
int _controller_period_usec
void Run() override
Calculates the heater element on/off time, carries out closed loop feedback and feedforward temperatu...
#define ORB_ID(_name)
Generates a pointer to the uORB metadata structure for a given topic.
float integrator(char *argv[])
Sets and/or reports the heater controller integrator gain value.
static int print_usage(const char *reason=nullptr)
Prints the module usage to the nuttshell console.
uint32_t sensor_id()
Reports the heater target sensor.
int start()
Initiates the heater driver work queue, starts a new background task, and fails if it is already runn...
float _proportional_value
#define CONTROLLER_PERIOD_DEFAULT
float _sensor_temperature
static int task_spawn(int argc, char *argv[])
Initializes the class in the same context as the work queue and starts the background listener...
int print_status()
Reports curent status and diagnostic information about the heater driver.
sensor_accel_s _sensor_accel
void update_params(const bool force=false)
Updates and checks for updated uORB parameters.