The time threshold for checking device availability has been reduced
This commit is contained in:
parent
661f10efa1
commit
61f253b473
@ -1215,7 +1215,7 @@ void zh_device_availability_check_task(void *pvParameter)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (esp_timer_get_time() / 1000000 > available_device->time + (available_device->frequency * 3))
|
||||
if (esp_timer_get_time() / 1000000 > available_device->time + (available_device->frequency * 1.25)) // + 25% just in case.
|
||||
{
|
||||
char *topic = (char *)heap_caps_malloc(strlen(gateway_config->software_config.mqtt_topic_prefix) + strlen(zh_get_device_type_value_name(available_device->device_type)) + 27, MALLOC_CAP_8BIT);
|
||||
memset(topic, 0, strlen(gateway_config->software_config.mqtt_topic_prefix) + strlen(zh_get_device_type_value_name(available_device->device_type)) + 27);
|
||||
|
Loading…
x
Reference in New Issue
Block a user