2022-10-11 15:59:59 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AP_HAL/AP_HAL_Boards.h>
|
|
|
|
|
|
|
|
// Enabled 0 is compiled out (disabled)
|
|
|
|
// Enabled 1 is always enabled on all vehicles
|
|
|
|
// Enabled 2 is enabled with dummy methods for all vehicles except Sub and SITL
|
|
|
|
|
|
|
|
#ifndef AP_TEMPERATURE_SENSOR_ENABLED
|
2023-04-14 00:47:52 -03:00
|
|
|
#if BOARD_FLASH_SIZE <= 1024
|
2022-10-11 15:59:59 -03:00
|
|
|
#define AP_TEMPERATURE_SENSOR_ENABLED 0
|
|
|
|
#elif (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
|
|
|
|
#define AP_TEMPERATURE_SENSOR_ENABLED 1
|
|
|
|
#else
|
|
|
|
#define AP_TEMPERATURE_SENSOR_ENABLED 2
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2024-08-13 04:48:25 -03:00
|
|
|
#ifndef AP_TEMPERATURE_SENSOR_BACKEND_DEFAULT_ENABLED
|
|
|
|
#define AP_TEMPERATURE_SENSOR_BACKEND_DEFAULT_ENABLED AP_TEMPERATURE_SENSOR_ENABLED
|
|
|
|
#endif
|
|
|
|
|
2023-01-19 18:21:01 -04:00
|
|
|
#ifndef AP_TEMPERATURE_SENSOR_MAX31865_ENABLED
|
2024-08-13 04:48:25 -03:00
|
|
|
#define AP_TEMPERATURE_SENSOR_MAX31865_ENABLED AP_TEMPERATURE_SENSOR_BACKEND_DEFAULT_ENABLED
|
2023-01-19 18:21:01 -04:00
|
|
|
#endif
|
|
|
|
|
2023-09-22 20:54:19 -03:00
|
|
|
#ifndef AP_TEMPERATURE_SENSOR_ANALOG_ENABLED
|
2024-08-13 04:48:25 -03:00
|
|
|
#define AP_TEMPERATURE_SENSOR_ANALOG_ENABLED AP_TEMPERATURE_SENSOR_BACKEND_DEFAULT_ENABLED
|
2023-09-22 20:54:19 -03:00
|
|
|
#endif
|
2022-10-11 15:59:59 -03:00
|
|
|
|
2024-01-15 19:16:53 -04:00
|
|
|
#ifndef AP_TEMPERATURE_SENSOR_DRONECAN_ENABLED
|
2024-08-13 04:48:25 -03:00
|
|
|
#define AP_TEMPERATURE_SENSOR_DRONECAN_ENABLED AP_TEMPERATURE_SENSOR_BACKEND_DEFAULT_ENABLED && HAL_ENABLE_DRONECAN_DRIVERS
|
2024-01-15 19:16:53 -04:00
|
|
|
#endif
|
|
|
|
#if AP_TEMPERATURE_SENSOR_DRONECAN_ENABLED && !HAL_ENABLE_DRONECAN_DRIVERS
|
|
|
|
#error AP_TEMPERATURE_SENSOR_DRONECAN_ENABLED requires HAL_ENABLE_DRONECAN_DRIVERS
|
|
|
|
#endif
|
2022-10-11 15:59:59 -03:00
|
|
|
|
2024-04-26 10:46:32 -03:00
|
|
|
#ifndef AP_TEMPERATURE_SENSOR_MLX90614_ENABLED
|
|
|
|
#define AP_TEMPERATURE_SENSOR_MLX90614_ENABLED AP_TEMPERATURE_SENSOR_ENABLED
|
|
|
|
#endif
|
|
|
|
|
2022-10-11 15:59:59 -03:00
|
|
|
// maximum number of Temperature Sensors
|
|
|
|
#ifndef AP_TEMPERATURE_SENSOR_MAX_INSTANCES
|
|
|
|
#define AP_TEMPERATURE_SENSOR_MAX_INSTANCES 3
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// first sensor is always the primary sensor
|
|
|
|
#ifndef AP_TEMPERATURE_SENSOR_PRIMARY_INSTANCE
|
|
|
|
#define AP_TEMPERATURE_SENSOR_PRIMARY_INSTANCE 0
|
|
|
|
#endif
|
|
|
|
|