5 static const char *
const TAG =
"LD2420.number";
12 this->
parent_->new_config.timeout = timeout;
16 if ((uint16_t) min_gate > this->
parent_->new_config.max_gate) {
17 min_gate = this->
parent_->get_min_gate_distance_value();
19 this->
parent_->new_config.min_gate = (uint16_t) min_gate;
25 if ((uint16_t) max_gate < this->
parent_->new_config.min_gate) {
26 max_gate = this->
parent_->get_max_gate_distance_value();
28 this->
parent_->new_config.max_gate = (uint16_t) max_gate;
34 const uint8_t gate = (uint8_t) gate_select;
36 this->
parent_->publish_gate_move_threshold(gate);
37 this->
parent_->publish_gate_still_threshold(gate);
42 this->
parent_->gate_move_sensitivity_factor = move_factor;
47 this->
parent_->gate_still_sensitivity_factor = still_factor;
54 if (!this->
parent_->is_gate_select()) {
55 this->
parent_->new_config.move_thresh[this->
gate_] = move_threshold;
57 this->
parent_->new_config.move_thresh[this->
parent_->get_gate_select_value()] = move_threshold;
65 if (!this->
parent_->is_gate_select()) {
66 this->
parent_->new_config.still_thresh[this->
gate_] = still_threshold;
68 this->
parent_->new_config.still_thresh[this->
parent_->get_gate_select_value()] = still_threshold;
void control(float still_factor) override
void control(float max_gate) override
LD2420MoveThresholdNumbers()=default
void control(float move_threshold) override
LD2420StillThresholdNumbers()=default
void control(float min_gate) override
void publish_state(float state)
void control(float gate_select) override
LD2420Component * parent_
void control(float still_threshold) override
Implementation of SPI Controller mode.
void control(float timeout) override
void control(float move_factor) override