mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-13 01:09:04 +08:00
Update bmx280.cpp (#993)
fix bmx280 sensor bug. Signed-off-by: E2D <engineer2designer@gmail.com>
This commit is contained in:
parent
b6a720f96a
commit
ad7706f334
@ -117,7 +117,7 @@ uint8_t BMX280SensorDevice::GetModel(uint8_t i) {
|
|||||||
const char *BMX280SensorDevice::GetCurrentModelString() {
|
const char *BMX280SensorDevice::GetCurrentModelString() {
|
||||||
uint8_t sensortype = ESP3DSettings::readByte(ESP_SENSOR_TYPE);
|
uint8_t sensortype = ESP3DSettings::readByte(ESP_SENSOR_TYPE);
|
||||||
for (uint8_t i = 0; i < NB_TYPE_SENSOR; i++) {
|
for (uint8_t i = 0; i < NB_TYPE_SENSOR; i++) {
|
||||||
if ((sensortype == SENSOR_TYPE[i]) {
|
if (sensortype == SENSOR_ID[i]) {
|
||||||
return SENSOR_NAME[i];
|
return SENSOR_NAME[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -173,7 +173,7 @@ const char *BMX280SensorDevice::GetData() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
s = "DISCONNECTED";
|
s = "DISCONNECTED";
|
||||||
log_esp3_ed("No valid data");
|
esp3d_log_e("No valid data");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user