Subversion Repositories HomeAutomation

Rev

Rev 1349 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1349 Rev 1351
Line 1... Line 1...
1
 
1
 
2
loadScript("Personal/cLCD_MenuItems/MainMenuItem.js");
2
loadScript("Personal/cLCD_MenuItems/MainMenuItem.js");
3
loadScript("Personal/cLCD_MenuItems/DtmfMenuItem.js");
3
loadScript("Personal/cLCD_MenuItems/DimmerMenuItem.js");
4
//loadScript("Personal/cLCD_MenuItems/DimmerClcdMenuItem.js");
4
loadScript("Personal/cLCD_MenuItems/SensorMenuItem.js");
5
 
5
 
6
function CLCD_Display(type, name, id)
6
function CLCD_Display(type, name, id)
7
{
7
{
8
    /* We must always call the parent constructor, initialization
8
    /* We must always call the parent constructor, initialization
9
       of variables could be done here, but initialize is a better place */
9
       of variables could be done here, but initialize is a better place */
Line 22... Line 22...
22
CLCD_Display.prototype.myInterval = null;
22
CLCD_Display.prototype.myInterval = null;
23
CLCD_Display.prototype.myIntervalAlways = null;
23
CLCD_Display.prototype.myIntervalAlways = null;
24
CLCD_Display.prototype.myIntervalScreenSaver = null;
24
CLCD_Display.prototype.myIntervalScreenSaver = null;
25
 
25
 
26
CLCD_Display.prototype.MainMenuItem = null;
26
CLCD_Display.prototype.MainMenuItem = null;
27
CLCD_Display.prototype.SettingMenuItem = null;
27
CLCD_Display.prototype.SensorMenuItem = null;
28
CLCD_Display.prototype.DtmfMenuItem = null;
28
CLCD_Display.prototype.DimmerMenuItem = null;
29
 
29
 
30
/* The currently displayed menuitem */
30
/* The currently displayed menuitem */
31
CLCD_Display.prototype.currentMenuItem = null;
31
CLCD_Display.prototype.currentMenuItem = null;
32
 
32
 
33
/* counter for going to screensaver */
33
/* counter for going to screensaver */
Line 37... Line 37...
37
CLCD_Display.prototype.mainScreenCnt = null;
37
CLCD_Display.prototype.mainScreenCnt = null;
38
 
38
 
39
const Display_mainScreenTimeout = 20;
39
const Display_mainScreenTimeout = 20;
40
const Display_screenSaverTimeout = 25;
40
const Display_screenSaverTimeout = 25;
41
 
41
 
42
CLCD_Display.prototype.defaultBacklight = 60;
42
CLCD_Display.prototype.defaultBacklight = 10;
43
 
43
 
44
/* This function must always be declared, this is where all the startup code
44
/* This function must always be declared, this is where all the startup code
45
   should be placed. Gets called with arguments like what ids to use etc. */
45
   should be placed. Gets called with arguments like what ids to use etc. */
46
CLCD_Display.prototype.initialize = function(initialArguments)
46
CLCD_Display.prototype.initialize = function(initialArguments)
47
{
47
{
Line 100... Line 100...
100
    /* If the service is already online we should call the handler here */
100
    /* If the service is already online we should call the handler here */
101
    this.rotaryOnline();
101
    this.rotaryOnline();
102
 
102
 
103
        /* create the first menu item */
103
        /* create the first menu item */
104
    this.MainMenuItem = new MainMenuItem(this, this.myCLCDService);
104
    this.MainMenuItem = new MainMenuItem(this, this.myCLCDService);
105
//this.SettingMenuItem = new SettingsMenuItem(this, this.myCLCDService);
105
this.SensorMenuItem = new SensorMenuItem(this, this.myCLCDService);
106
this.DtmfMenuItem = new DtmfMenuItem(this, this.myCLCDService);
106
this.DimmerMenuItem = new DimmerMenuItem(this, this.myCLCDService);
107
   
107
   
108
    this.currentMenuItem = this.MainMenuItem;
108
    this.currentMenuItem = this.MainMenuItem;
109
 
109
 
110
   
110
   
111
    /* create the screensaver menu item */
111
    /* create the screensaver menu item */
112
//  this.SettingMenuItem.LeftItem=this.MainMenuItem;
112
    this.SensorMenuItem.LeftItem=this.DimmerMenuItem;
113
//  this.SettingMenuItem.RightItem=this.DimmerGlcdMenuItem;
113
    this.SensorMenuItem.RightItem=this.MainMenuItem;
114
 
114
 
115
    /* set the function that shall be executed when knob is turned */
115
    /* set the function that shall be executed when knob is turned */
116
    /* create the screensaver menu item */
116
    /* create the screensaver menu item */
117
    this.MainMenuItem.LeftItem=this.DtmfMenuItem;
117
    this.MainMenuItem.LeftItem=this.SensorMenuItem;
118
    this.MainMenuItem.RightItem=this.DtmfMenuItem;
118
    this.MainMenuItem.RightItem=this.DimmerMenuItem;
119
    this.DtmfMenuItem.RightItem=this.MainMenuItem;
119
    this.DimmerMenuItem.RightItem=this.SensorMenuItem;
120
    this.DtmfMenuItem.LeftItem=this.MainMenuItem;
120
    this.DimmerMenuItem.LeftItem=this.MainMenuItem;
121
}
121
}
122
 
122
 
123
// 
123
// 
124
CLCD_Display.prototype.changeToLeft = function()
124
CLCD_Display.prototype.changeToLeft = function()
125
{
125
{