File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11#include " ZigbeeAnalog.h"
22#if CONFIG_ZB_ENABLED
3+ #include < cfloat>
34
45ZigbeeAnalog::ZigbeeAnalog (uint8_t endpoint) : ZigbeeEP(endpoint) {
56 _device_id = ESP_ZB_HA_SIMPLE_SENSOR_DEVICE_ID;
@@ -20,8 +21,8 @@ bool ZigbeeAnalog::addAnalogInput() {
2021 " Analog Input" ;
2122 uint32_t application_type = 0x00000000 | (ESP_ZB_ZCL_AI_GROUP_ID << 24 );
2223 float resolution = 0.1 ; // Default resolution of 0.1
23- float min = -3.402823e+38 ; // Default min value for float
24- float max = 3.402823e+38 ; // Default max value for float
24+ float min = -FLT_MAX ; // Default min value for float
25+ float max = FLT_MAX ; // Default max value for float
2526
2627 esp_err_t ret = esp_zb_analog_input_cluster_add_attr (esp_zb_analog_input_cluster, ESP_ZB_ZCL_ATTR_ANALOG_INPUT_DESCRIPTION_ID, (void *)default_description);
2728 if (ret != ESP_OK) {
@@ -91,8 +92,8 @@ bool ZigbeeAnalog::addAnalogOutput() {
9192 " Analog Output" ;
9293 uint32_t application_type = 0x00000000 | (ESP_ZB_ZCL_AO_GROUP_ID << 24 );
9394 float resolution = 1 ; // Default resolution of 1
94- float min = -3.402823e+38 ; // Default min value for float
95- float max = 3.402823e+38 ; // Default max value for float
95+ float min = -FLT_MAX ; // Default min value for float
96+ float max = FLT_MAX ; // Default max value for float
9697
9798 esp_err_t ret =
9899 esp_zb_analog_output_cluster_add_attr (esp_zb_analog_output_cluster, ESP_ZB_ZCL_ATTR_ANALOG_OUTPUT_DESCRIPTION_ID, (void *)default_description);
You can’t perform that action at this time.
0 commit comments