[hx711] clang-tidy fixes for #7822 (#7900)

This commit is contained in:
Keith Burzinski 2024-12-01 10:08:52 -06:00 committed by GitHub
parent 30477c764d
commit 8f69d07061
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -53,7 +53,7 @@ bool HX711Sensor::read_sensor_(uint32_t *result) {
}
// Cycle clock pin for gain setting
for (uint8_t i = 0; i < this->gain_; i++) {
for (uint8_t i = 0; i < static_cast<uint8_t>(this->gain_); i++) {
this->sck_pin_->digital_write(true);
delayMicroseconds(1);
this->sck_pin_->digital_write(false);

View file

@ -9,7 +9,7 @@
namespace esphome {
namespace hx711 {
enum HX711Gain {
enum HX711Gain : uint8_t {
HX711_GAIN_128 = 1,
HX711_GAIN_32 = 2,
HX711_GAIN_64 = 3,