9 namespace dfrobot_sen0395 {
11 class DfrobotSen0395Component;
20 virtual uint8_t
on_message(std::string &message) = 0;
34 uint8_t
on_message(std::string &message)
override;
49 uint8_t
on_message(std::string &message)
override;
57 DetRangeCfgCommand(
float min1,
float max1,
float min2,
float max2,
float min3,
float max3,
float min4,
float max4);
58 uint8_t
on_message(std::string &message)
override;
61 float min1_, max1_, min2_, max2_, min3_, max3_,
min4_, max4_;
68 uint8_t
on_message(std::string &message)
override;
78 char tmp_cmd[20] = {0};
79 sprintf(tmp_cmd,
"sensorCfgStart %d", startup_mode);
80 cmd_ = std::string(tmp_cmd);
82 uint8_t
on_message(std::string &message)
override;
91 uint8_t
on_message(std::string &message)
override;
97 uint8_t
on_message(std::string &message)
override;
103 uint8_t
on_message(std::string &message)
override;
114 cmd_ =
"setLedMode 1 0";
116 cmd_ =
"setLedMode 1 1";
119 uint8_t
on_message(std::string &message)
override;
129 cmd_ =
"setUartOutput 1 1";
131 cmd_ =
"setUartOutput 1 0";
134 uint8_t
on_message(std::string &message)
override;
144 sensitivity_ = sensitivity = 9;
145 char tmp_cmd[20] = {0};
146 sprintf(tmp_cmd,
"setSensitivity %d", sensitivity);
147 cmd_ = std::string(tmp_cmd);
149 uint8_t
on_message(std::string &message)
override;
SensitivityCommand(uint8_t sensitivity)
float delay_after_detection_
DfrobotSen0395Component * parent_
PowerCommand(bool power_on)
virtual uint8_t execute(DfrobotSen0395Component *parent)
UartOutputCommand(bool active)
virtual ~Command()=default
float delay_after_disappear_
uint32_t cmd_duration_ms_
SensorCfgStartCommand(bool startup_mode)
LedModeCommand(bool active)
Implementation of SPI Controller mode.
virtual uint8_t on_message(std::string &message)=0