|
Internal Interface Wrap
API reference
|
ESP32 internal temperature sensor implementation for the HardFOC system. More...
#include "base/BaseTemperature.h"#include "utils/PlatformMutex.h"#include "driver/temperature_sensor.h"#include "esp_err.h"#include "esp_log.h"#include "esp_timer.h"#include "freertos/FreeRTOS.h"#include "freertos/task.h"#include <atomic>#include <functional>Go to the source code of this file.
Classes | |
| struct | esp_temp_state_t |
| ESP32 specific temperature sensor state. More... | |
| struct | esp_temp_config_t |
| ESP32 specific temperature sensor configuration. More... | |
| struct | esp_temp_range_info_t |
| Temperature range information structure. More... | |
| class | EspTemperature |
| ESP32 internal temperature sensor implementation. More... | |
Macros | |
| #define | ESP_TEMP_DEFAULT_RESOLUTION_CELSIUS 0.25f |
| ESP32 Temperature sensor default values. | |
| #define | ESP_TEMP_DEFAULT_RESPONSE_TIME_MS 50 |
| Typical response time (50ms) | |
| #define | ESP_TEMP_DEFAULT_SAMPLE_RATE_HZ 10 |
| Default sample rate for continuous monitoring. | |
| #define | ESP_TEMP_MAX_SAMPLE_RATE_HZ 1000 |
| Maximum sample rate. | |
| #define | ESP_TEMP_MIN_SAMPLE_RATE_HZ 1 |
| Minimum sample rate. | |
| #define | ESP_TEMP_DEFAULT_TIMEOUT_MS 1000 |
| Default operation timeout. | |
| #define | ESP_TEMP_ABSOLUTE_MIN_CELSIUS -40.0f |
| ESP32 Temperature sensor range limits. | |
| #define | ESP_TEMP_ABSOLUTE_MAX_CELSIUS 125.0f |
| Absolute maximum temperature. | |
| #define | ESP_TEMP_RECOMMENDED_MIN_CELSIUS -10.0f |
| Recommended minimum for best accuracy. | |
| #define | ESP_TEMP_RECOMMENDED_MAX_CELSIUS 80.0f |
| Recommended maximum for best accuracy. | |
| #define | ESP_TEMP_CONFIG_DEFAULT() |
| Default ESP32 temperature sensor configuration. | |
Typedefs | |
| using | esp_temp_threshold_callback_t = std::function< void(EspTemperature *sensor, float temperature, bool is_high_threshold)> |
| ESP32 threshold callback function type. | |
| using | esp_temp_monitoring_callback_t = std::function< void(EspTemperature *sensor, float temperature, hf_u64_t timestamp_us)> |
| ESP32 continuous monitoring callback function type. | |
Enumerations | |
| enum | esp_temp_range_t { ESP_TEMP_RANGE_NEG10_80 = 0 , ESP_TEMP_RANGE_20_100 = 1 , ESP_TEMP_RANGE_NEG30_50 = 2 , ESP_TEMP_RANGE_50_125 = 3 , ESP_TEMP_RANGE_NEG40_20 = 4 , ESP_TEMP_RANGE_COUNT } |
| ESP32 Temperature sensor measurement ranges. More... | |
ESP32 internal temperature sensor implementation for the HardFOC system.
This file contains the declaration of the EspTemperature class that extends the BaseTemperature abstract class to provide comprehensive ESP32 temperature sensor functionality using the ESP-IDF temperature sensor driver.
Key features implemented:
| #define ESP_TEMP_ABSOLUTE_MAX_CELSIUS 125.0f |
Absolute maximum temperature.
| #define ESP_TEMP_ABSOLUTE_MIN_CELSIUS -40.0f |
ESP32 Temperature sensor range limits.
Absolute minimum temperature
| #define ESP_TEMP_CONFIG_DEFAULT | ( | ) |
Default ESP32 temperature sensor configuration.
ESP32 Temperature sensor default values.
Default resolution (0.25°C)
| #define ESP_TEMP_DEFAULT_RESPONSE_TIME_MS 50 |
Typical response time (50ms)
| #define ESP_TEMP_DEFAULT_SAMPLE_RATE_HZ 10 |
Default sample rate for continuous monitoring.
| #define ESP_TEMP_DEFAULT_TIMEOUT_MS 1000 |
Default operation timeout.
| #define ESP_TEMP_MAX_SAMPLE_RATE_HZ 1000 |
Maximum sample rate.
| #define ESP_TEMP_MIN_SAMPLE_RATE_HZ 1 |
Minimum sample rate.
| #define ESP_TEMP_RECOMMENDED_MAX_CELSIUS 80.0f |
Recommended maximum for best accuracy.
| #define ESP_TEMP_RECOMMENDED_MIN_CELSIUS -10.0f |
Recommended minimum for best accuracy.
| using esp_temp_monitoring_callback_t = std::function<void(EspTemperature* sensor, float temperature, hf_u64_t timestamp_us)> |
ESP32 continuous monitoring callback function type.
| using esp_temp_threshold_callback_t = std::function<void(EspTemperature* sensor, float temperature, bool is_high_threshold)> |
ESP32 threshold callback function type.
ESP32 Temperature sensor measurement ranges.
Each range has different accuracy characteristics optimized for specific use cases. Lower ranges generally provide better accuracy.