X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=main%2Fenigma.cpp;h=98175c49425f927a358a41f8d1471f04b96ab328;hp=36fcea4b6985bcbdd0b76bbd310ba18818b32429;hb=925629a36b521924a774da09b4f11515dd1889b3;hpb=361de59820cf1bde180548782a647a5137b2a21c diff --git a/main/enigma.cpp b/main/enigma.cpp index 36fcea4..98175c4 100644 --- a/main/enigma.cpp +++ b/main/enigma.cpp @@ -1,5 +1,8 @@ -#include #include +#include +#include +#include +#include #include #include @@ -239,12 +242,13 @@ int main(int argc, char **argv) setIoPrio(IOPRIO_CLASS_BE, 3); - python.execute("mytest", "__main__"); - +// python.execute("mytest", "__main__"); + python.execFile("/usr/lib/enigma2/python/mytest.py"); + if (exit_code == 5) /* python crash */ { eDebug("(exit code 5)"); - bsodFatal(); + bsodFatal(0); } dsk.paint(); @@ -276,6 +280,24 @@ void runMainloop() void quitMainloop(int exitCode) { + FILE *f = fopen("/proc/stb/fp/was_timer_wakeup", "w"); + if (f) + { + fprintf(f, "%d", 0); + fclose(f); + } + else + { + int fd = open("/dev/dbox/fp0", O_WRONLY); + if (fd >= 0) + { + if (ioctl(fd, 10 /*FP_CLEAR_WAKEUP_TIMER*/) < 0) + eDebug("FP_CLEAR_WAKEUP_TIMER failed (%m)"); + close(fd); + } + else + eDebug("open /dev/dbox/fp0 for wakeup timer clear failed!(%m)"); + } exit_code = exitCode; eApp->quit(0); } @@ -297,5 +319,5 @@ const char *getEnigmaVersionString() void dump_malloc_stats(void) { struct mallinfo mi = mallinfo(); - printf("MALLOC: %d total\n", mi.uordblks); + eDebug("MALLOC: %d total", mi.uordblks); }