]> git.kernelconcepts.de Git - metawatch.git/blobdiff - mw_main.c
More callbacks, further GUI work
[metawatch.git] / mw_main.c
index c08b2d307320a30233d5a2fac050acf06a591466..dd4e4a418854697272b400113a153aa2888350c8 100644 (file)
--- a/mw_main.c
+++ b/mw_main.c
@@ -343,7 +343,7 @@ void process_cmd(char *cmdline, int clinep, mwdata_t *mwdata)
        }
        if (strncmp(cmdline, "srtc", 4) == 0) {
                fprintf(stderr, "Setting RTC from system time...");
        }
        if (strncmp(cmdline, "srtc", 4) == 0) {
                fprintf(stderr, "Setting RTC from system time...");
-               mw_set_rtc(&mwdata->mwdevice, MW_RTC_CLOCK_24HR, MW_RTC_DATE_DDMM);
+               mw_set_rtc(&mwdata->mwdevice, MW_RTC_CLOCK_12HR, MW_RTC_DATE_MMDD);
                fprintf(stderr, "OK\n");
        }
        if (strncmp(cmdline, "grtc", 4) == 0) {
                fprintf(stderr, "OK\n");
        }
        if (strncmp(cmdline, "grtc", 4) == 0) {
@@ -399,7 +399,8 @@ void process_cmd(char *cmdline, int clinep, mwdata_t *mwdata)
                bitmap_read(&mwdata->mwdevice);
        }
        if (strncmp(cmdline, "tnote", 5) == 0) {
                bitmap_read(&mwdata->mwdevice);
        }
        if (strncmp(cmdline, "tnote", 5) == 0) {
-               test_notification(&mwdata->mwdevice);
+               // test_notification(&mwdata->mwdevice);
+               mw_do_notification(&mwdata->mwdevice, "TestNotification", "This is a pretty long text that needs to be broken and torn", 1);
        }
        if (strncmp(cmdline, "tapp", 4) == 0) {
                test_application(&mwdata->mwdevice);
        }
        if (strncmp(cmdline, "tapp", 4) == 0) {
                test_application(&mwdata->mwdevice);
@@ -598,6 +599,8 @@ int main(int argc, char **argv)
        memset(mdata.cmdline, 0, 128);
        mdata.cmdline_pos = 0;
 
        memset(mdata.cmdline, 0, 128);
        mdata.cmdline_pos = 0;
 
+       mw_init(&mdata.mwdevice, mw_fd);
+
        g_main_loop_run (mdata.mloop);
 
        fsync(mw_fd);
        g_main_loop_run (mdata.mloop);
 
        fsync(mw_fd);