fix: 温度传感器不识别。

This commit is contained in:
Ivan Li 2023-03-04 13:50:18 +08:00
parent 58d0cc55ae
commit 4b716751a2

View File

@ -73,12 +73,12 @@ void fetch_temperature(void* arg) {
}
void auto_fetch_temperature() {
if (i2c_check_slave_exists(GX21M15_ADDRESS)) {
is_temperature_online = 1;
} else {
is_temperature_online = 0;
return;
}
// if (i2c_check_slave_exists(GX21M15_ADDRESS >> 1)) {
// is_temperature_online = 1;
// } else {
// is_temperature_online = 0;
// return;
// }
ESP_LOGI(TEMPERATURE_TAG, "auto_fetch_temperature");
xTaskCreate(fetch_temperature, "temperature", 2048, NULL, 10, NULL);
}