mirror of
https://github.com/esphome/esphome.git
synced 2025-02-08 14:10:54 +00:00
Bug with undeclared numbers
This commit is contained in:
parent
a88f15797f
commit
28bb6f5507
@ -110,6 +110,7 @@ void LD2415HComponent::loop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_NUMBER
|
||||||
void LD2415HComponent::set_min_speed_threshold(uint8_t speed) {
|
void LD2415HComponent::set_min_speed_threshold(uint8_t speed) {
|
||||||
this->min_speed_threshold_ = speed;
|
this->min_speed_threshold_ = speed;
|
||||||
this->update_speed_angle_sense_ = true;
|
this->update_speed_angle_sense_ = true;
|
||||||
@ -125,6 +126,23 @@ void LD2415HComponent::set_sensitivity(uint8_t sensitivity) {
|
|||||||
this->update_speed_angle_sense_ = true;
|
this->update_speed_angle_sense_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LD2415HComponent::set_vibration_correction(uint8_t correction) {
|
||||||
|
this->vibration_correction_ = correction;
|
||||||
|
this->update_anti_vib_comp_ = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LD2415HComponent::set_relay_trigger_duration(uint8_t duration) {
|
||||||
|
this->relay_trigger_duration_ = duration;
|
||||||
|
this->update_relay_duration_speed_ = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LD2415HComponent::set_relay_trigger_speed(uint8_t speed) {
|
||||||
|
this->relay_trigger_speed_ = speed;
|
||||||
|
this->update_relay_duration_speed_ = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_SELECT
|
||||||
void LD2415HComponent::set_tracking_mode(const std::string &state) {
|
void LD2415HComponent::set_tracking_mode(const std::string &state) {
|
||||||
uint8_t mode = TRACKING_MODE_STR_TO_INT.at(state);
|
uint8_t mode = TRACKING_MODE_STR_TO_INT.at(state);
|
||||||
this->set_tracking_mode(mode);
|
this->set_tracking_mode(mode);
|
||||||
@ -149,21 +167,7 @@ void LD2415HComponent::set_sample_rate(uint8_t rate) {
|
|||||||
this->sample_rate_ = rate;
|
this->sample_rate_ = rate;
|
||||||
this->update_mode_rate_uom_ = true;
|
this->update_mode_rate_uom_ = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
void LD2415HComponent::set_vibration_correction(uint8_t correction) {
|
|
||||||
this->vibration_correction_ = correction;
|
|
||||||
this->update_anti_vib_comp_ = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LD2415HComponent::set_relay_trigger_duration(uint8_t duration) {
|
|
||||||
this->relay_trigger_duration_ = duration;
|
|
||||||
this->update_relay_duration_speed_ = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LD2415HComponent::set_relay_trigger_speed(uint8_t speed) {
|
|
||||||
this->relay_trigger_speed_ = speed;
|
|
||||||
this->update_relay_duration_speed_ = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LD2415HComponent::issue_command_(const uint8_t cmd[], uint8_t size) {
|
void LD2415HComponent::issue_command_(const uint8_t cmd[], uint8_t size) {
|
||||||
for (uint8_t i = 0; i < size; i++)
|
for (uint8_t i = 0; i < size; i++)
|
||||||
|
@ -56,7 +56,6 @@ class LD2415HComponent : public Component, public uart::UARTDevice {
|
|||||||
void set_tracking_mode_select(select::Select *selector) { this->tracking_mode_selector_ = selector; };
|
void set_tracking_mode_select(select::Select *selector) { this->tracking_mode_selector_ = selector; };
|
||||||
#endif
|
#endif
|
||||||
float get_setup_priority() const override { return setup_priority::HARDWARE; }
|
float get_setup_priority() const override { return setup_priority::HARDWARE; }
|
||||||
// void set_speed_sensor(sensor::Sensor *speed_sensor) { this->speed_sensor_ = speed_sensor; }
|
|
||||||
void register_listener(LD2415HListener *listener) { this->listeners_.push_back(listener); }
|
void register_listener(LD2415HListener *listener) { this->listeners_.push_back(listener); }
|
||||||
|
|
||||||
void set_min_speed_threshold(uint8_t speed);
|
void set_min_speed_threshold(uint8_t speed);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user