Fixing function reference.

This commit is contained in:
CptSkippy 2024-06-01 15:48:30 -07:00
parent dd81f9a835
commit eb9fffa5a3
2 changed files with 4 additions and 4 deletions

View file

@ -14,7 +14,7 @@ LD2415HComponent = ld2415h_ns.class_("LD2415HComponent", cg.Component, uart.UART
CONF_LD2415H_ID = "ld2415h_id"
CONFIG_SCHEMA = (
CONFIG_SCHEMA = cv.All(
cv.Schema(
{
cv.GenerateID(): cv.declare_id(LD2415HComponent),

View file

@ -33,8 +33,8 @@ void LD2415HComponent::setup() {
this->relay_trigger_speed_number_->publish_state(this->relay_trigger_speed_);
#endif
#ifdef USE_SELECT
this->sample_rate_selector_->publish_state(i_to_s_(SAMPLE_RATE_STR_TO_INT, this->sample_rate_));
this->tracking_mode_selector_->publish_state(i_to_s_(TRACKING_MODE_STR_TO_INT, this->tracking_mode_));
this->sample_rate_selector_->publish_state(this->i_to_s_(SAMPLE_RATE_STR_TO_INT, this->sample_rate_));
this->tracking_mode_selector_->publish_state(this->i_to_s_(TRACKING_MODE_STR_TO_INT, this->tracking_mode_));
#endif
}
@ -446,7 +446,7 @@ const char *LD2415HComponent::negotiation_mode_to_s_(NegotiationMode value) {
}
}
const char *i_to_s(const std::map<std::string, uint8_t> &map, uint8_t i) {
const char *LD2415HComponent::i_to_s_(const std::map<std::string, uint8_t> &map, uint8_t i) {
for (const auto &pair : map) {
if (pair.second == i) {
return pair.first.c_str();