Skip to content

Commit 090735e

Browse files
committed
fan: fix xQueueSend() error at startup
1 parent 925813f commit 090735e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main/src/user/fan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ static void fan_task(void *pvParameter)
143143
pin_init();
144144
pwm_init();
145145

146+
xEventGroupSetBits(user_event_group, FAN_RUN_BIT);
147+
146148
ESP_LOGI(TAG, "started.");
147149

148150
while (1) {
@@ -271,8 +273,6 @@ bool fan_env_saved(void)
271273

272274
void fan_init(void)
273275
{
274-
xEventGroupSetBits(user_event_group, FAN_RUN_BIT);
275-
276276
size_t length = sizeof(fan_duty);
277277
app_getenv("FAN_INIT_CFG", &fan_duty, &length);
278278

0 commit comments

Comments
 (0)