mirror of
https://github.com/esphome/esphome.git
synced 2025-01-18 20:10:55 +00:00
Also ignore general error bit.
This commit is contained in:
parent
1fbed0ae75
commit
7f88304a62
@ -74,13 +74,14 @@ void MAX31855Sensor::read_data_() {
|
|||||||
this->status_set_warning();
|
this->status_set_warning();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((mem & 0x00000002) && !this->ignore_short_circuit_errors_) {
|
if (!this->ignore_short_circuit_errors_) {
|
||||||
|
if (mem & 0x00000002) {
|
||||||
ESP_LOGW(TAG, "Thermocouple short circuit to ground fault from MAX31855 (0x%08" PRIX32 ")", mem);
|
ESP_LOGW(TAG, "Thermocouple short circuit to ground fault from MAX31855 (0x%08" PRIX32 ")", mem);
|
||||||
this->publish_state(NAN);
|
this->publish_state(NAN);
|
||||||
this->status_set_warning();
|
this->status_set_warning();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((mem & 0x00000004) && !this->ignore_short_circuit_errors_) {
|
if (mem & 0x00000004) {
|
||||||
ESP_LOGW(TAG, "Thermocouple short circuit to VCC fault from MAX31855 (0x%08" PRIX32 ")", mem);
|
ESP_LOGW(TAG, "Thermocouple short circuit to VCC fault from MAX31855 (0x%08" PRIX32 ")", mem);
|
||||||
this->publish_state(NAN);
|
this->publish_state(NAN);
|
||||||
this->status_set_warning();
|
this->status_set_warning();
|
||||||
@ -92,6 +93,7 @@ void MAX31855Sensor::read_data_() {
|
|||||||
this->status_set_warning();
|
this->status_set_warning();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Decode thermocouple temperature
|
// Decode thermocouple temperature
|
||||||
int16_t val = (mem & 0xFFFC0000) >> 18;
|
int16_t val = (mem & 0xFFFC0000) >> 18;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user