4 #ifdef USE_BINARY_SENSOR 22 #ifdef USE_TEXT_SENSOR 34 namespace seeed_mr24hpc1 {
86 static const char *
const S_SCENE_STR[5] = {
"None",
"Living Room",
"Bedroom",
"Washroom",
"Area Detection"};
87 static const bool S_SOMEONE_EXISTS_STR[2] = {
false,
true};
88 static const char *
const S_MOTION_STATUS_STR[3] = {
"None",
"Motionless",
"Active"};
89 static const char *
const S_KEEP_AWAY_STR[3] = {
"None",
"Close",
"Away"};
90 static const char *
const S_UNMANNED_TIME_STR[9] = {
"None",
"10s",
"30s",
"1min",
"2min",
91 "5min",
"10min",
"30min",
"60min"};
92 static const char *
const S_BOUNDARY_STR[10] = {
"0.5m",
"1.0m",
"1.5m",
"2.0m",
"2.5m",
93 "3.0m",
"3.5m",
"4.0m",
"4.5m",
"5.0m"};
94 static const float S_PRESENCE_OF_DETECTION_RANGE_STR[7] = {0.0f, 0.5f, 1.0f, 1.5f, 2.0f, 2.5f, 3.0f};
98 #ifdef USE_TEXT_SENSOR 99 SUB_TEXT_SENSOR(heartbeat_state)
100 SUB_TEXT_SENSOR(product_model)
101 SUB_TEXT_SENSOR(product_id)
102 SUB_TEXT_SENSOR(hardware_model)
103 SUB_TEXT_SENSOR(firware_version)
104 SUB_TEXT_SENSOR(keep_away)
105 SUB_TEXT_SENSOR(motion_status)
106 SUB_TEXT_SENSOR(custom_mode_end)
108 #ifdef USE_BINARY_SENSOR 109 SUB_BINARY_SENSOR(has_target)
112 SUB_SENSOR(custom_presence_of_detection)
113 SUB_SENSOR(movement_signs)
114 SUB_SENSOR(custom_motion_distance)
115 SUB_SENSOR(custom_spatial_static_value)
116 SUB_SENSOR(custom_spatial_motion_value)
117 SUB_SENSOR(custom_motion_speed)
118 SUB_SENSOR(custom_mode_num)
121 SUB_SWITCH(underlying_open_function)
125 SUB_BUTTON(custom_set_end)
128 SUB_SELECT(scene_mode)
129 SUB_SELECT(unman_time)
130 SUB_SELECT(existence_boundary)
131 SUB_SELECT(motion_boundary)
134 SUB_NUMBER(sensitivity)
135 SUB_NUMBER(custom_mode)
136 SUB_NUMBER(existence_threshold)
137 SUB_NUMBER(motion_threshold)
138 SUB_NUMBER(motion_trigger)
139 SUB_NUMBER(motion_to_rest)
140 SUB_NUMBER(custom_unman_time)
144 char c_product_mode_[PRODUCT_BUF_MAX_SIZE + 1];
145 char c_product_id_[PRODUCT_BUF_MAX_SIZE + 1];
146 char c_hardware_model_[PRODUCT_BUF_MAX_SIZE + 1];
147 char c_firmware_version_[PRODUCT_BUF_MAX_SIZE + 1];
148 uint8_t s_output_info_switch_flag_;
149 uint8_t sg_recv_data_state_;
150 uint8_t sg_frame_len_;
151 uint8_t sg_data_len_;
152 uint8_t sg_frame_buf_[FRAME_BUF_MAX_SIZE];
153 uint8_t sg_frame_prase_buf_[FRAME_BUF_MAX_SIZE];
154 int sg_start_query_data_;
155 bool check_dev_inf_sign_;
156 bool poll_time_base_func_check_;
159 void r24_split_data_frame_(uint8_t value);
160 void r24_parse_data_frame_(uint8_t *data, uint8_t
len);
161 void r24_frame_parse_open_underlying_information_(uint8_t *data);
162 void r24_frame_parse_work_status_(uint8_t *data);
163 void r24_frame_parse_product_information_(uint8_t *data);
164 void r24_frame_parse_human_information_(uint8_t *data);
165 void send_query_(
const uint8_t *query,
size_t string_length);
169 void setup()
override;
171 void loop()
override;
void get_spatial_motion_value()
void set_custom_mode(uint8_t mode)
void get_motion_trigger_time()
void get_target_movement_speed()
void get_human_motion_info()
void set_existence_boundary(uint8_t value)
void get_heartbeat_packet()
void get_existence_threshold()
const float LATE
For components that should be initialized at the very end of the setup process.
void get_distance_of_static_object()
void set_motion_threshold(uint8_t value)
float get_setup_priority() const override
void get_existence_boundary()
void set_sensitivity(uint8_t value)
void get_motion_boundary()
void set_custom_end_mode()
void get_custom_unman_time()
void get_hardware_model()
void set_motion_boundary(uint8_t value)
BedjetMode mode
BedJet operating mode.
void set_unman_time(uint8_t value)
void dump_config() override
void get_spatial_static_value()
void set_motion_trigger_time(uint8_t value)
void set_motion_to_rest_time(uint16_t value)
void set_existence_threshold(uint8_t value)
void set_custom_unman_time(uint16_t value)
void get_radar_output_information_switch()
void get_motion_to_rest_time()
Implementation of SPI Controller mode.
void get_distance_of_moving_object()
void get_motion_threshold()
void set_underlying_open_function(bool enable)
void set_scene_mode(uint8_t value)
void get_firmware_version()
void get_body_motion_params()