Merge branch 'dev' into nvds-new-espnow

This commit is contained in:
NP v/d Spek 2024-10-15 23:42:50 +02:00 committed by GitHub
commit 6cf18c079e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,8 @@
extern "C" { extern "C" {
uint8_t temprature_sens_read(); uint8_t temprature_sens_read();
} }
#elif defined(USE_ESP32_VARIANT_ESP32C3) || defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3) #elif defined(USE_ESP32_VARIANT_ESP32C3) || defined(USE_ESP32_VARIANT_ESP32C6) || \
defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3)
#include "driver/temp_sensor.h" #include "driver/temp_sensor.h"
#endif // USE_ESP32_VARIANT #endif // USE_ESP32_VARIANT
#endif // USE_ESP32 #endif // USE_ESP32
@ -34,7 +35,8 @@ void InternalTemperatureSensor::update() {
ESP_LOGV(TAG, "Raw temperature value: %d", raw); ESP_LOGV(TAG, "Raw temperature value: %d", raw);
temperature = (raw - 32) / 1.8f; temperature = (raw - 32) / 1.8f;
success = (raw != 128); success = (raw != 128);
#elif defined(USE_ESP32_VARIANT_ESP32C3) || defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3) #elif defined(USE_ESP32_VARIANT_ESP32C3) || defined(USE_ESP32_VARIANT_ESP32C6) || \
defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3)
temp_sensor_config_t tsens = TSENS_CONFIG_DEFAULT(); temp_sensor_config_t tsens = TSENS_CONFIG_DEFAULT();
temp_sensor_set_config(tsens); temp_sensor_set_config(tsens);
temp_sensor_start(); temp_sensor_start();