Subversion Repositories HomeAutomation

Rev

Rev 1203 | Rev 1212 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1203 Rev 1204
Line 50... Line 50...
50
Display.prototype.screenSaverCnt = null;
50
Display.prototype.screenSaverCnt = null;
51
 
51
 
52
/* counter for going to main screen */
52
/* counter for going to main screen */
53
Display.prototype.mainScreenCnt = null;
53
Display.prototype.mainScreenCnt = null;
54
 
54
 
55
const exchangeUpdateTimeout = 20;
55
const exchangeUpdateTimeout = 50;
56
const mainScreenTimeout = 40;
56
const mainScreenTimeout = 40;
57
const screenSaverTimeout = 120;
57
const screenSaverTimeout = 120;
58
 
58
 
59
/* This function must always be declared, this is where all the startup code
59
/* This function must always be declared, this is where all the startup code
60
   should be placed. Gets called with arguments like what ids to use etc. */
60
   should be placed. Gets called with arguments like what ids to use etc. */
Line 138... Line 138...
138
    this.currentMenuItem = this.statusMenuItem;
138
    this.currentMenuItem = this.statusMenuItem;
139
   
139
   
140
    /* create the menuitem where you can choose to enter the booking sub-menu */
140
    /* create the menuitem where you can choose to enter the booking sub-menu */
141
    this.bookMenuItem = new MenuItem(this);
141
    this.bookMenuItem = new MenuItem(this);
142
    this.bookMenuItem.displayData[0] = this.lcdCenterText("Book room");
142
    this.bookMenuItem.displayData[0] = this.lcdCenterText("Book room");
143
    this.bookMenuItem.displayData[1] = this.lcdCenterText("");
143
    this.bookMenuItem.displayData[1] = this.lcdCenterText("(Not implemented)");
144
    this.bookMenuItem.doUpdate = this.updateBookMenuItem;
144
    this.bookMenuItem.doUpdate = this.updateBookMenuItem;
145
 
145
 
146
    /* connect the items as a linked list */
146
    /* connect the items as a linked list */
147
    this.statusMenuItem.setNextItem(this.bookMenuItem);
147
    this.statusMenuItem.setNextItem(this.bookMenuItem);
148
    this.statusMenuItem.setPrevItem(this.bookMenuItem);
148
    this.statusMenuItem.setPrevItem(this.bookMenuItem);
Line 398... Line 398...
398
        for (var i = 0; i < this.exchangeData.meetings.length; i++)
398
        for (var i = 0; i < this.exchangeData.meetings.length; i++)
399
        {
399
        {
400
//log("looping \n");
400
//log("looping \n");
401
            /* create the menuitem for a calendar meeting */
401
            /* create the menuitem for a calendar meeting */
402
            var menu = new MenuItem(this);
402
            var menu = new MenuItem(this);
403
            menu.displayData[0] = this.lcdCenterText(this.exchangeData.meetings[i].subject);
403
            menu.displayData[0] = this.lcdCenterText(this.replaceAumlauts(this.exchangeData.meetings[i].subject));
404
            menu.displayData[1] = this.lcdCenterText(this.exchangeData.meetings[i].start.replace(":",".") + " - "
404
            menu.displayData[1] = this.lcdCenterText(this.exchangeData.meetings[i].start.replace(":",".") + " - "
405
                                        + this.exchangeData.meetings[i].end.replace(":","."));
405
                                        + this.exchangeData.meetings[i].end.replace(":","."));
406
            menu.doRight = this.changeToNext;
406
            menu.doRight = this.changeToNext;
407
            menu.doLeft = this.changeToPrev;
407
            menu.doLeft = this.changeToPrev;
408
           
408
           
Line 432... Line 432...
432
                this.statusMenuItem.setNextItem(this.exchangeCalendarFirstMenuItem);
432
                this.statusMenuItem.setNextItem(this.exchangeCalendarFirstMenuItem);
433
                this.bookMenuItem.setPrevItem(this.exchangeCalendarLastMenuItem);
433
                this.bookMenuItem.setPrevItem(this.exchangeCalendarLastMenuItem);
434
            }
434
            }
435
        }
435
        }
436
    }
436
    }
-
 
437
}
-
 
438
 
-
 
439
Display.prototype.replaceAumlauts = function(intext)
-
 
440
{
-
 
441
    intext = intext.replace(/Å/, "A");
-
 
442
    intext = intext.replace(/å/, "a");
-
 
443
    intext = intext.replace(/Ä/, "A");
-
 
444
    intext = intext.replace(/ä/, "a");
-
 
445
    intext = intext.replace(/Ö/, "O");
-
 
446
    intext = intext.replace(/ö/, "o");
-
 
447
    return intext;
437
}
448
}
438
 
449
 
439
Display.prototype.softPwmOnline = function()
450
Display.prototype.softPwmOnline = function()
440
{
451
{
441
}
452
}