1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-08 04:43:46 +01:00

[fingerprint_grow] Fix clang-tidy sign comparison error (#11050)

This commit is contained in:
J. Nick Koston
2025-10-06 09:15:56 -05:00
committed by GitHub
parent 74c055745f
commit f86b83cda5
2 changed files with 3 additions and 2 deletions

View File

@@ -80,7 +80,7 @@ void FingerprintGrowComponent::setup() {
delay(20); // This delay guarantees the sensor will in fact be powered power. delay(20); // This delay guarantees the sensor will in fact be powered power.
if (this->check_password_()) { if (this->check_password_()) {
if (this->new_password_ != -1) { if (this->new_password_ != std::numeric_limits<uint32_t>::max()) {
if (this->set_password_()) if (this->set_password_())
return; return;
} else { } else {

View File

@@ -6,6 +6,7 @@
#include "esphome/components/binary_sensor/binary_sensor.h" #include "esphome/components/binary_sensor/binary_sensor.h"
#include "esphome/components/uart/uart.h" #include "esphome/components/uart/uart.h"
#include <limits>
#include <vector> #include <vector>
namespace esphome { namespace esphome {
@@ -177,7 +178,7 @@ class FingerprintGrowComponent : public PollingComponent, public uart::UARTDevic
uint8_t address_[4] = {0xFF, 0xFF, 0xFF, 0xFF}; uint8_t address_[4] = {0xFF, 0xFF, 0xFF, 0xFF};
uint16_t capacity_ = 64; uint16_t capacity_ = 64;
uint32_t password_ = 0x0; uint32_t password_ = 0x0;
uint32_t new_password_ = -1; uint32_t new_password_ = std::numeric_limits<uint32_t>::max();
GPIOPin *sensing_pin_{nullptr}; GPIOPin *sensing_pin_{nullptr};
GPIOPin *sensor_power_pin_{nullptr}; GPIOPin *sensor_power_pin_{nullptr};
uint8_t enrollment_image_ = 0; uint8_t enrollment_image_ = 0;