ESPHome  2024.9.2
gate_config_number.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "../ld2420.h"
5 
6 namespace esphome {
7 namespace ld2420 {
8 
9 class LD2420TimeoutNumber : public number::Number, public Parented<LD2420Component> {
10  public:
11  LD2420TimeoutNumber() = default;
12 
13  protected:
14  void control(float timeout) override;
15 };
16 
17 class LD2420MinDistanceNumber : public number::Number, public Parented<LD2420Component> {
18  public:
19  LD2420MinDistanceNumber() = default;
20 
21  protected:
22  void control(float min_gate) override;
23 };
24 
25 class LD2420MaxDistanceNumber : public number::Number, public Parented<LD2420Component> {
26  public:
27  LD2420MaxDistanceNumber() = default;
28 
29  protected:
30  void control(float max_gate) override;
31 };
32 
33 class LD2420GateSelectNumber : public number::Number, public Parented<LD2420Component> {
34  public:
35  LD2420GateSelectNumber() = default;
36 
37  protected:
38  void control(float gate_select) override;
39 };
40 
41 class LD2420MoveSensFactorNumber : public number::Number, public Parented<LD2420Component> {
42  public:
43  LD2420MoveSensFactorNumber() = default;
44 
45  protected:
46  void control(float move_factor) override;
47 };
48 
49 class LD2420StillSensFactorNumber : public number::Number, public Parented<LD2420Component> {
50  public:
51  LD2420StillSensFactorNumber() = default;
52 
53  protected:
54  void control(float still_factor) override;
55 };
56 
57 class LD2420StillThresholdNumbers : public number::Number, public Parented<LD2420Component> {
58  public:
59  LD2420StillThresholdNumbers() = default;
60  LD2420StillThresholdNumbers(uint8_t gate);
61 
62  protected:
63  uint8_t gate_;
64  void control(float still_threshold) override;
65 };
66 
67 class LD2420MoveThresholdNumbers : public number::Number, public Parented<LD2420Component> {
68  public:
69  LD2420MoveThresholdNumbers() = default;
70  LD2420MoveThresholdNumbers(uint8_t gate);
71 
72  protected:
73  uint8_t gate_;
74  void control(float move_threshold) override;
75 };
76 
77 } // namespace ld2420
78 } // namespace esphome
Base-class for all numbers.
Definition: number.h:39
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void control(float timeout) override
Helper class to easily give an object a parent of type T.
Definition: helpers.h:521