Fix some warnings, add screen_update IDLE to quit

This commit is contained in:
Nils Faerber 2011-11-09 23:20:30 +01:00
parent 201b7df50b
commit 45df0eb30c

View file

@ -257,8 +257,8 @@ int days(int m1, int y1)
void draw_idle_calendar(mwdevice_t *mwdevice) void draw_idle_calendar(mwdevice_t *mwdevice)
{ {
long unsigned int t; long unsigned int t;
unsigned int y,y1,m,m1,d,da,i,j,k; 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 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" }; const char dnames[7][3] = { "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So" };
mw_buffer *mwbuf; mw_buffer *mwbuf;
unsigned char *bbuf; unsigned char *bbuf;
@ -429,7 +429,7 @@ void test_oled(mwdevice_t *mwdevice, unsigned char oled)
{ {
mw_buffer *mwbuf; mw_buffer *mwbuf;
unsigned char *bbuf; unsigned char *bbuf;
int len, i; int len;
mwbuf = mw_alloc_pbuffer(80, 16, 1); mwbuf = mw_alloc_pbuffer(80, 16, 1);
mw_buf_clear(mwbuf, MW_BLACK); 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) { if (strncmp(cmdline, "quit", 4) == 0) {
//close(mw_fd); //close(mw_fd);
//exit(0); //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); g_main_loop_quit (mwdata->mloop);
} }
if (strncmp(cmdline, "help", 4) == 0) { if (strncmp(cmdline, "help", 4) == 0) {