#include "app_state.h" /* Definitions of shared application state */ SemaphoreHandle_t xSensorDataMutex = NULL; SemaphoreHandle_t xMqttMessageMutex = NULL; SemaphoreHandle_t xTimePeriodMutex = NULL; SemaphoreHandle_t xControlFlagMutex = NULL; bool servo_control_flag = false; bool fan_control_flag = false; bool buzzer_control_flag = false; bool light_source_control_flag = false; uint8_t led_brightness_value = 0; bool led_backlight_on = false; device_message_t g_device_message; float g_temperature_threshold = 39.0f; bool g_cooling_mode_enabled = false; bool g_high_temp_alerted = false; // 时间段配置(昼间/夜间) time_period_config_t g_day_period = {.start_hour = 8, .start_minute = 0, .end_hour = 20, .end_minute = 0}; time_period_config_t g_night_period = {.start_hour = 20, .start_minute = 0, .end_hour = 8, .end_minute = 0}; bool g_use_time_period = false; // 是否启用时间段控制