fix: 温度传感器不识别。
This commit is contained in:
parent
58d0cc55ae
commit
4b716751a2
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user