mirror of
https://github.com/esphome/esphome.git
synced 2025-01-08 13:51:43 +01:00
Fix int service variables for ESP32-C3
This commit is contained in:
parent
21af3f4eee
commit
378b46f811
2 changed files with 7 additions and 6 deletions
|
@ -166,9 +166,10 @@ void LD2450Component::on_reset_radar_zone_() {
|
|||
}
|
||||
|
||||
// Service set_radar_zone
|
||||
void LD2450Component::on_set_radar_zone_(int zone_type, int zone1_x1, int zone1_y1, int zone1_x2, int zone1_y2,
|
||||
int zone2_x1, int zone2_y1, int zone2_x2, int zone2_y2, int zone3_x1,
|
||||
int zone3_y1, int zone3_x2, int zone3_y2) {
|
||||
void LD2450Component::on_set_radar_zone_(int32_t zone_type, int32_t zone1_x1, int32_t zone1_y1, int32_t zone1_x2,
|
||||
int32_t zone1_y2, int32_t zone2_x1, int32_t zone2_y1, int32_t zone2_x2,
|
||||
int32_t zone2_y2, int32_t zone3_x1, int32_t zone3_y1, int32_t zone3_x2,
|
||||
int32_t zone3_y2) {
|
||||
this->zone_type_ = zone_type;
|
||||
int zone_parameters[12] = {zone1_x1, zone1_y1, zone1_x2, zone1_y2, zone2_x1, zone2_y1,
|
||||
zone2_x2, zone2_y2, zone3_x1, zone3_y1, zone3_x2, zone3_y2};
|
||||
|
|
|
@ -212,9 +212,9 @@ class LD2450Component : public Component, public uart::UARTDevice {
|
|||
float restore_from_flash_();
|
||||
Target target_info_[MAX_TARGETS];
|
||||
Zone zone_config_[MAX_ZONES];
|
||||
void on_set_radar_zone_(int zone_type, int zone1_x1, int zone1_y1, int zone1_x2, int zone1_y2, int zone2_x1,
|
||||
int zone2_y1, int zone2_x2, int zone2_y2, int zone3_x1, int zone3_y1, int zone3_x2,
|
||||
int zone3_y2);
|
||||
void on_set_radar_zone_(int32_t zone_type, int32_t zone1_x1, int32_t zone1_y1, int32_t zone1_x2, int32_t zone1_y2,
|
||||
int32_t zone2_x1, int32_t zone2_y1, int32_t zone2_x2, int32_t zone2_y2, int32_t zone3_x1,
|
||||
int32_t zone3_y1, int32_t zone3_x2, int32_t zone3_y2);
|
||||
int16_t decode_coordinate_(uint8_t low_byte, uint8_t high_byte) {
|
||||
int16_t coordinate = (high_byte & 0x7F) << 8 | low_byte;
|
||||
if ((high_byte & 0x80) == 0)
|
||||
|
|
Loading…
Reference in a new issue