Fix some warnings, add screen_update IDLE to quit
authorNils Faerber <nils.faerber@kernelconcepts.de>
Wed, 9 Nov 2011 22:20:30 +0000 (23:20 +0100)
committerNils Faerber <nils.faerber@kernelconcepts.de>
Wed, 9 Nov 2011 22:20:30 +0000 (23:20 +0100)
mw_main.c

index a2c94af..d391048 100644 (file)
--- a/mw_main.c
+++ b/mw_main.c
@@ -257,8 +257,8 @@ int days(int m1, int y1)
 void draw_idle_calendar(mwdevice_t *mwdevice)
 {
        long unsigned int t;
-       unsigned int y,y1,m,m1,d,da,i,j,k;
-       const char a[12][20]={"January","February","March","April","May","June","July","August","September","October","November","December"};
+       unsigned int y,y1,m,m1,d,i,j,k;
+       /* const char a[12][20]={"January","February","March","April","May","June","July","August","September","October","November","December"}; */
        const char dnames[7][3] = { "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So" };
        mw_buffer *mwbuf;
        unsigned char *bbuf;
@@ -429,7 +429,7 @@ void test_oled(mwdevice_t *mwdevice, unsigned char oled)
 {
        mw_buffer *mwbuf;
        unsigned char *bbuf;
-       int len, i;
+       int len;
 
        mwbuf = mw_alloc_pbuffer(80, 16, 1);
        mw_buf_clear(mwbuf, MW_BLACK);
@@ -483,6 +483,8 @@ void process_cmd(char *cmdline, int clinep, mwdata_t *mwdata)
        if (strncmp(cmdline, "quit", 4) == 0) {
                //close(mw_fd);
                //exit(0);
+               /* just in case we quit and show another screen */
+               mw_update_display(&mwdata->mwdevice, MW_SCREEN_MODE_IDLE, 0);
                g_main_loop_quit (mwdata->mloop);
        }
        if (strncmp(cmdline, "help", 4) == 0) {