Firmware
Classes | Macros | Functions
sensors.cpp File Reference
#include <board_config.h>
#include <px4_config.h>
#include <px4_module.h>
#include <px4_module_params.h>
#include <px4_getopt.h>
#include <px4_posix.h>
#include <px4_tasks.h>
#include <px4_time.h>
#include <fcntl.h>
#include <poll.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <stdio.h>
#include <errno.h>
#include <math.h>
#include <mathlib/mathlib.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_rc_input.h>
#include <drivers/drv_adc.h>
#include <drivers/drv_airspeed.h>
#include <airspeed/airspeed.h>
#include <parameters/param.h>
#include <systemlib/err.h>
#include <perf/perf_counter.h>
#include <battery/battery.h>
#include <conversion/rotation.h>
#include <uORB/uORB.h>
#include <uORB/topics/actuator_controls.h>
#include <uORB/topics/vehicle_control_mode.h>
#include <uORB/topics/parameter_update.h>
#include <uORB/topics/battery_status.h>
#include <uORB/topics/differential_pressure.h>
#include <uORB/topics/airspeed.h>
#include <uORB/topics/sensor_preflight.h>
#include <uORB/topics/vehicle_air_data.h>
#include <uORB/topics/vehicle_magnetometer.h>
#include <DevMgr.hpp>
#include "parameters.h"
#include "rc_update.h"
#include "voted_sensors_update.h"

Classes

class  Sensors
 

Macros

#define PCB_TEMP_ESTIMATE_DEG   5.0f
 Analog layout: FMU: IN2 - battery voltage IN3 - battery current IN4 - 5V sense IN10 - spare (we could actually trim these from the set) IN11 - spare on FMUv2 & v3, RC RSSI on FMUv4 IN12 - spare (we could actually trim these from the set) IN13 - aux1 on FMUv2, unavaible on v3 & v4 IN14 - aux2 on FMUv2, unavaible on v3 & v4 IN15 - pressure sensor on FMUv2, unavaible on v3 & v4. More...
 
#define STICK_ON_OFF_LIMIT   0.75f
 

Functions

__EXPORT int sensors_main (int argc, char *argv[])
 Sensor app start / stop handling function.
 

Detailed Description

Author
Lorenz Meier loren.nosp@m.z@px.nosp@m.4.io
Julian Oes julia.nosp@m.n@oe.nosp@m.s.ch
Thomas Gubler thoma.nosp@m.s@px.nosp@m.4.io
Anton Babushkin anton.nosp@m.@px4.nosp@m..io
Beat Küng beat-.nosp@m.kuen.nosp@m.g@gmx.nosp@m..net

Macro Definition Documentation

§ PCB_TEMP_ESTIMATE_DEG

#define PCB_TEMP_ESTIMATE_DEG   5.0f

Analog layout: FMU: IN2 - battery voltage IN3 - battery current IN4 - 5V sense IN10 - spare (we could actually trim these from the set) IN11 - spare on FMUv2 & v3, RC RSSI on FMUv4 IN12 - spare (we could actually trim these from the set) IN13 - aux1 on FMUv2, unavaible on v3 & v4 IN14 - aux2 on FMUv2, unavaible on v3 & v4 IN15 - pressure sensor on FMUv2, unavaible on v3 & v4.

IO: IN4 - servo supply rail IN5 - analog RSSI on FMUv2 & v3

The channel definitions (e.g., ADC_BATTERY_VOLTAGE_CHANNEL, ADC_BATTERY_CURRENT_CHANNEL, and ADC_AIRSPEED_VOLTAGE_CHANNEL) are defined in board_config.h HACK - true temperature is much less than indicated temperature in baro, subtract 5 degrees in an attempt to account for the electrical upheating of the PCB