From 98766aaabcb1fa74123247a52e72a453b6da59f8 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Sat, 22 Nov 2025 20:44:51 +0800
Subject: [PATCH] Update TSL2561 to sample for 5 times
---
project/lightd/lightd.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/project/lightd/lightd.c b/project/lightd/lightd.c
index 22ce0cb..4af1957 100644
--- a/project/lightd/lightd.c
+++ b/project/lightd/lightd.c
@@ -2,8 +2,8 @@
* Copyright: (C) 2019 LingYun IoT System Studio
* All rights reserved.
*
- * Filename: main.c
- * Description: This file
+ * Filename: lightd.c
+ * Description: This file is infrared detect auto light program on RaspberryPi
*
* Version: 1.0.0(29/01/19)
* Author: Guo Wenxue <guowenxue@gmail.com>
@@ -23,7 +23,7 @@
#include <cjson/cJSON.h>
#include "logger.h"
-#include "util_proc.h"
+#include "proc.h"
#include "config.h"
#include "tsl2561.h"
#include "ds18b20.h"
@@ -142,8 +142,8 @@
log_info("Auto light control thread start\n");
while( ! g_signal.stop )
{
- /* TSL2561 update lux in every 5 minutes */
- if(check_timeout(&last_time, 300))
+ /* TSL2561 update lux in every 10 minutes */
+ if(check_timeout(&last_time, 600))
{
/* The TSL2561 sensor is not present, do not turn on the light */
if( !hwinfo->tsl2561 )
--
Gitblit v1.9.1