Changeset 14280
- Timestamp:
- 02/24/12 18:40:13 (10 years ago)
- Location:
- titan/titan
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/powerofftimer.h
r14271 r14280 30 30 void checkshutdowntimer() 31 31 { 32 int mode = 0; 32 33 if(status.standby != 0) return; 33 34 … … 37 38 time_t akttime = time(NULL); 38 39 39 if((status.sd_timer != NULL && status.sd_timer->active && status.sd_timer->shutdown_time < akttime) || (status.fixpowerofftime > 1 && status.fixpowerofftime > akttime - 180 && status.fixpowerofftime < akttime)) 40 if(status.sd_timer != NULL && status.sd_timer->active && status.sd_timer->shutdown_time < akttime) 41 mode = 1; 42 43 if(status.fixpowerofftime > 1 && status.fixpowerofftime > akttime - 180 && status.fixpowerofftime < akttime) 44 mode = 2; 45 46 if(mode > 0) 40 47 { 41 status.fixpowerofftime += 86400;48 if(status.fixpowerofftime > 1) status.fixpowerofftime += 86400; 42 49 status.sd_timer->active = 0; 43 50 if(getconfigint("shutdowntimetype", NULL) == 0) 44 oshutdown(1, 3); 51 { 52 if(mode == 2) 53 { 54 mode = 0; 55 oshutdown(1, 4); 56 } 57 else 58 { 59 mode = 0; 60 oshutdown(1, 3); 61 } 62 } 45 63 else 46 64 { 65 mode = 0; 47 66 status.standby = 2; 48 67 screenstandby(); -
titan/titan/titan.c
r14207 r14280 192 192 //flag: 2 check record / do write config 193 193 //flag: 3 check record with timeout 194 //flag: 4 check record with increase fixpowerofftime 194 195 void oshutdown(int exitcode, int flag) 195 196 { … … 202 203 203 204 //check if record running 204 if((flag == 1 || flag == 2 || flag == 3) && (status.recording > 0 || getrectimerbytimediff(300) != NULL)) 205 { 205 if((flag == 1 || flag == 2 || flag == 3 || flag == 4) && (status.recording > 0 || getrectimerbytimediff(300) != NULL)) 206 { 207 if(flag == 4 && status.fixpowerofftime > 1) 208 { 209 status.fixpowerofftime = time(NULL) + 900; //check powerofftimer again in 15min 210 return; 211 } 206 212 int timeout = 0; 207 if(flag == 3 ) timeout = 15;213 if(flag == 3 || flag == 4) timeout = 15; 208 214 if(textbox(_("Message"), _("Found running record\nor record is starting in next time.\nRealy shutdown ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, timeout, 1) == 2) 209 215 return;
Note: See TracChangeset
for help on using the changeset viewer.