mirror of
https://github.com/esphome/esphome.git
synced 2025-03-15 15:18:16 +00:00
Update hx711.cpp
This commit is contained in:
parent
e0ae7c1601
commit
0cbe2e71bb
@ -27,7 +27,7 @@ float HX711Sensor::get_setup_priority() const { return setup_priority::DATA; }
|
|||||||
void HX711Sensor::update() {
|
void HX711Sensor::update() {
|
||||||
uint32_t result;
|
uint32_t result;
|
||||||
if (this->read_sensor_(&result)) {
|
if (this->read_sensor_(&result)) {
|
||||||
int32_t value = static_cast<int32_t>(result)
|
int32_t value = static_cast<int32_t>(result);
|
||||||
ESP_LOGD(TAG, "'%s': Got value %d", this->name_.c_str(), value);
|
ESP_LOGD(TAG, "'%s': Got value %d", this->name_.c_str(), value);
|
||||||
this->publish_state(value);
|
this->publish_state(value);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user