mirror of
https://github.com/esphome/esphome.git
synced 2025-01-08 13:51:43 +01:00
Fixing function reference.
This commit is contained in:
parent
dd81f9a835
commit
eb9fffa5a3
2 changed files with 4 additions and 4 deletions
|
@ -14,7 +14,7 @@ LD2415HComponent = ld2415h_ns.class_("LD2415HComponent", cg.Component, uart.UART
|
||||||
|
|
||||||
CONF_LD2415H_ID = "ld2415h_id"
|
CONF_LD2415H_ID = "ld2415h_id"
|
||||||
|
|
||||||
CONFIG_SCHEMA = (
|
CONFIG_SCHEMA = cv.All(
|
||||||
cv.Schema(
|
cv.Schema(
|
||||||
{
|
{
|
||||||
cv.GenerateID(): cv.declare_id(LD2415HComponent),
|
cv.GenerateID(): cv.declare_id(LD2415HComponent),
|
||||||
|
|
|
@ -33,8 +33,8 @@ void LD2415HComponent::setup() {
|
||||||
this->relay_trigger_speed_number_->publish_state(this->relay_trigger_speed_);
|
this->relay_trigger_speed_number_->publish_state(this->relay_trigger_speed_);
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_SELECT
|
#ifdef USE_SELECT
|
||||||
this->sample_rate_selector_->publish_state(i_to_s_(SAMPLE_RATE_STR_TO_INT, this->sample_rate_));
|
this->sample_rate_selector_->publish_state(this->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->tracking_mode_selector_->publish_state(this->i_to_s_(TRACKING_MODE_STR_TO_INT, this->tracking_mode_));
|
||||||
#endif
|
#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) {
|
for (const auto &pair : map) {
|
||||||
if (pair.second == i) {
|
if (pair.second == i) {
|
||||||
return pair.first.c_str();
|
return pair.first.c_str();
|
||||||
|
|
Loading…
Reference in a new issue