hydreon_rgxx: Fix parsing of data line (#7192)

This commit is contained in:
Daniel Kraft 2024-08-05 23:17:02 +02:00 committed by GitHub
parent e02319dcff
commit f737ca6e28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -236,7 +236,7 @@ void HydreonRGxxComponent::process_line_() {
}
bool is_data_line = false;
for (int i = 0; i < NUM_SENSORS; i++) {
if (this->sensors_[i] != nullptr && this->buffer_starts_with_(PROTOCOL_NAMES[i])) {
if (this->sensors_[i] != nullptr && this->buffer_.find(PROTOCOL_NAMES[i]) != std::string::npos) {
is_data_line = true;
break;
}