#include <heater.h>
|
| Heater () |
|
virtual | ~Heater () |
|
int | controller_period (char *argv[]) |
| Sets and/or reports the heater controller time period value in microseconds. More...
|
|
float | integrator (char *argv[]) |
| Sets and/or reports the heater controller integrator gain value. More...
|
|
float | proportional (char *argv[]) |
| Sets and/or reports the heater controller proportional gain value. More...
|
|
uint32_t | sensor_id () |
| Reports the heater target sensor. More...
|
|
int | start () |
| Initiates the heater driver work queue, starts a new background task, and fails if it is already running. More...
|
|
int | print_status () |
| Reports curent status and diagnostic information about the heater driver. More...
|
|
float | temperature_setpoint (char *argv[]) |
| Sets and/or reports the heater target temperature. More...
|
|
|
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. More...
|
|
static int | print_usage (const char *reason=nullptr) |
| Prints the module usage to the nuttshell console. More...
|
|
static int | task_spawn (int argc, char *argv[]) |
| Initializes the class in the same context as the work queue and starts the background listener. More...
|
|
|
void | Run () override |
| Calculates the heater element on/off time, carries out closed loop feedback and feedforward temperature control, and schedules the next cycle. More...
|
|
void | update_params (const bool force=false) |
| Updates and checks for updated uORB parameters. More...
|
|
|
static struct work_s | _work |
| Work queue struct for the RTOS scheduler. More...
|
|
Definition at line 64 of file heater.h.
◆ Heater()
◆ ~Heater()
◆ controller_period()
int Heater::controller_period |
( |
char * |
argv[] | ) |
|
Sets and/or reports the heater controller time period value in microseconds.
- Parameters
-
argv | Pointer to the input argument array. |
- Returns
- Returns 0 iff successful, -1 otherwise.
◆ custom_command()
int Heater::custom_command |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
|
static |
main Main entry point to the module that should be called directly from the module's main method.
- See also
- ModuleBase::custom_command().
- Parameters
-
argc | The input argument count. |
argv | Pointer to the input argument array. |
- Returns
- Returns 0 iff successful, -1 otherwise.
Definition at line 67 of file heater.cpp.
References is_running(), and print_usage().
◆ initialize_topics()
void Heater::initialize_topics |
( |
| ) |
|
|
protected |
◆ integrator()
float Heater::integrator |
( |
char * |
argv[] | ) |
|
Sets and/or reports the heater controller integrator gain value.
- Parameters
-
argv | Pointer to the input argument array. |
- Returns
- Returns the heater integrator gain value iff successful, 0.0f otherwise.
◆ print_status()
int Heater::print_status |
( |
| ) |
|
◆ print_usage()
int Heater::print_usage |
( |
const char * |
reason = nullptr | ) |
|
|
static |
Prints the module usage to the nuttshell console.
- See also
- ModuleBase::print_usage().
- Parameters
-
reason | The requested reason for printing to console. |
Definition at line 209 of file heater.cpp.
Referenced by custom_command().
◆ proportional()
float Heater::proportional |
( |
char * |
argv[] | ) |
|
Sets and/or reports the heater controller proportional gain value.
- Parameters
-
argv | Pointer to the input argument array. |
- Returns
- Returns the heater proportional gain value iff successful, 0.0f otherwise.
◆ Run()
Calculates the heater element on/off time, carries out closed loop feedback and feedforward temperature control, and schedules the next cycle.
Definition at line 78 of file heater.cpp.
References _controller_period_usec, _controller_time_on_usec, _heater_on, _integrator_value, _proportional_value, _sensor_accel, _sensor_accel_sub, _sensor_temperature, math::constrain(), f(), sensor_accel_s::temperature, uORB::Subscription::update(), and update_params().
◆ sensor_id()
uint32_t Heater::sensor_id |
( |
| ) |
|
Reports the heater target sensor.
- Returns
- Returns the id of the target sensor
◆ start()
◆ task_spawn()
int Heater::task_spawn |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
|
static |
Initializes the class in the same context as the work queue and starts the background listener.
- See also
- ModuleBase::task_spawn().
- Parameters
-
argv | Pointer to the input argument array. |
- Returns
- Returns 0 iff successful, -1 otherwise.
Definition at line 179 of file heater.cpp.
References Heater(), and start().
◆ temperature_setpoint()
float Heater::temperature_setpoint |
( |
char * |
argv[] | ) |
|
Sets and/or reports the heater target temperature.
- Parameters
-
argv | Pointer to the input argument array. |
- Returns
- Returns the heater target temperature value iff successful, -1.0f otherwise.
◆ update_params()
void Heater::update_params |
( |
const bool |
force = false | ) |
|
|
private |
◆ _controller_period_usec
◆ _controller_time_on_usec
int Heater::_controller_time_on_usec = 0 |
|
private |
◆ _heater_on
bool Heater::_heater_on = false |
|
private |
◆ _integrator_value
float Heater::_integrator_value = 0.0f |
|
private |
◆ _parameter_update_sub
◆ _proportional_value
float Heater::_proportional_value = 0.0f |
|
private |
◆ _sensor_accel
◆ _sensor_accel_sub
◆ _sensor_temperature
float Heater::_sensor_temperature = 0.0f |
|
private |
◆ _work
struct work_s Heater::_work |
|
staticprivate |
Work queue struct for the RTOS scheduler.
Definition at line 167 of file heater.h.
The documentation for this class was generated from the following files: