瀏覽代碼

improve lora rx auto reset

Thomas Buck 10 月之前
父節點
當前提交
0e81983f59
共有 2 個檔案被更改,包括 5 行新增4 行删除
  1. 1
    1
      compile_commands.json
  2. 4
    3
      src/lora.cpp

+ 1
- 1
compile_commands.json 查看文件

1
-.pio/build/loratx/compile_commands.json
1
+.pio/build/lorarx/compile_commands.json

+ 4
- 3
src/lora.cpp 查看文件

368
 #endif // DEEP_SLEEP_TIMEOUT_MS && DEEP_SLEEP_DURATION_S
368
 #endif // DEEP_SLEEP_TIMEOUT_MS && DEEP_SLEEP_DURATION_S
369
 
369
 
370
 #ifndef FEATURE_SML
370
 #ifndef FEATURE_SML
371
-    if (time >= (6UL * 60UL * 60UL * 1000UL) // running for at least 6h
372
-        && ((time - last_rx) >= (30UL * 1000UL))) { // and last lora rx at least 30s ago
373
-        heltec_deep_sleep(10); // attempt reset to avoid lorarx hanging
371
+    if ((time >= (6UL * 60UL * 60UL * 1000UL) // running for at least 6h
372
+        && ((time - last_rx) >= (30UL * 1000UL))) // and last lora rx at least 30s ago
373
+        || ((time - last_rx) >= (4UL * 60UL * 1000UL))) { // or last message longer than 4min ago
374
+        heltec_deep_sleep(5); // attempt reset to avoid lorarx hanging
374
     }
375
     }
375
 #endif // ! FEATURE_SML
376
 #endif // ! FEATURE_SML
376
 
377
 

Loading…
取消
儲存