diff src/cs/layer1/cfile/l1_pwmgr.c @ 328:daddb933047d

L1 sleep logic change: allow big sleep when light is on or we are charging
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 14 Dec 2017 02:45:22 +0000
parents 50a15a54801e
children dc1e0a1c100f
line wrap: on
line diff
--- a/src/cs/layer1/cfile/l1_pwmgr.c	Fri Dec 08 03:05:19 2017 +0000
+++ b/src/cs/layer1/cfile/l1_pwmgr.c	Thu Dec 14 02:45:22 2017 +0000
@@ -843,10 +843,18 @@
     // in case big sleep is choosen (sleep mode == FRAME_STOP) because of UART or SIM,
     // return and wait end of this activity (few TDMA frames) then check on next TDMA frames
     // if MS can go in deep sleep
+    /*
+     * FreeCalypso change: the abstention from big sleep because of UART or SIM
+     * has been moved into Cust_check_system(), which now returns DO_NOT_SLEEP
+     * in these cases, while still returning FRAME_STOP if the cause is
+     * the backlight or charging.
+     */
     if (    !min_time
          || !HWtimer
          || !min_time_gauging
+       #if 0	/* FreeCalypso change */
          || (sleep_mode != CLOCK_STOP)
+       #endif
        #if (OP_BT == 1)
          || !hci_ll_status
        #endif