Skip to content

Commit f5dbcc3

Browse files
committed
fan: update timer alarm value
1 parent 9159d35 commit f5dbcc3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main/src/user/fan.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static void tim_init(void)
8989
};
9090
timer_init(TIMER_GROUP_0, TIMER_0, &tim_conf);
9191

92-
timer_set_alarm_value(TIMER_GROUP_0, TIMER_0, 800000ULL);
92+
timer_set_alarm_value(TIMER_GROUP_0, TIMER_0, 1000000ULL);
9393

9494
timer_enable_intr(TIMER_GROUP_0, TIMER_0);
9595
timer_isr_register(TIMER_GROUP_0, TIMER_0, tim_isr_handler, NULL, ESP_INTR_FLAG_IRAM, NULL);
@@ -182,10 +182,10 @@ static void fan_task(void *pvParameter)
182182
}
183183
#endif
184184
case 0xff:
185-
if (rpm_cnt++ == 4) {
185+
if (rpm_cnt++ == 3) {
186186
rpm_cnt = 0;
187187

188-
fan_rpm = 60.0 / time_sum;
188+
fan_rpm = 45.0 / time_sum;
189189

190190
time_sum = 0.0;
191191
} else {

0 commit comments

Comments
 (0)