Page screensaver2
    Attributes
        ID                 : 0
        Scope              : local
        Dragging           : 0
        Send Component ID  : disabled
        Opacity            : 127
        Width              : 480
        Effect             : load
        Effect Priority    : 0
        Effect Time        : 300
        Locked             : no
        Swide up page ID   : disabled
        Swide down page ID : disabled
        Swide left page ID : disabled
        Swide right page ID: disabled
        Fill               : solid color
        Back. Color        : 0
    
    Events
        Preinitialize Event
            tSend.txt="event,renderCurrentPage"
            //send calc crc
            btlen tSend.txt,sys0
            crcrest 1,0xffff // reset CRC
            crcputh 55 bb
            crcputs sys0,2
            crcputs tSend.txt,0
            //send cmd
            printh 55 bb
            prints sys0,2
            prints tSend.txt,0
            prints crcval,2
            dim=dimValueNormal
            recmod=1
            baud=115200
            vis tInstruction,0
            vis tTmp,0
            vis p0,0
            vis tNotifyHead,0
            vis tNotifyText,0
            //load gloabl time string from pageIcons
            //tTime.txt=vaTime.txt
            spstr pageIcons.vaTime.txt,tTime.txt,"?",0
            spstr pageIcons.vaTime.txt,tAMPM.txt,"?",1
            if(tAMPM.txt=="")
            {
                vis tAMPM,0
            }
            tDate.txt=pageIcons.vaDate.txt
            dim=dimValue
            vis tSend,0
            //page open event
            // clear weather elements, to keep example content in HMI
        
        Postinitialize Event
            click m0,1
        
Variable (string) entn1
    Attributes
        ID            : 59
        Scope         : local
        Text          : 
        Max. Text Size: 14
    
Variable (string) entn2
    Attributes
        ID            : 60
        Scope         : local
        Text          : 
        Max. Text Size: 14
    
Variable (string) entn3
    Attributes
        ID            : 61
        Scope         : local
        Text          : 
        Max. Text Size: 14
    
Variable (string) entn4
    Attributes
        ID            : 62
        Scope         : local
        Text          : 
        Max. Text Size: 14
    
Variable (string) entn5
    Attributes
        ID            : 63
        Scope         : local
        Text          : 
        Max. Text Size: 14
    
Variable (string) strCommand
    Attributes
        ID            : 4
        Scope         : local
        Text          : 
        Max. Text Size: 1935
    
Variable (string) strTmp
    Attributes
        ID            : 31
        Scope         : local
        Text          : 
        Max. Text Size: 2
    
Variable (string) tId
    Attributes
        ID            : 12
        Scope         : local
        Text          : 
        Max. Text Size: 25
    
Variable (string) tInstruction
    Attributes
        ID            : 18
        Scope         : local
        Text          : 
        Max. Text Size: 15
    
Variable (string) tSend
    Attributes
        ID            : 20
        Scope         : local
        Text          : 
        Max. Text Size: 50
    
Variable (string) tTmp
    Attributes
        ID            : 19
        Scope         : local
        Text          : 
        Max. Text Size: 30
    
Variable (int32) vaTap
    Attributes
        ID   : 14
        Scope: local
        Value: 0
    
Variable (int32) xc1
    Attributes
        ID   : 25
        Scope: local
        Value: 0
    
Variable (int32) xc2
    Attributes
        ID   : 27
        Scope: local
        Value: 0
    
Variable (int32) xcR
    Attributes
        ID   : 30
        Scope: local
        Value: 0
    
Variable (int32) yc1
    Attributes
        ID   : 26
        Scope: local
        Value: 0
    
Variable (int32) yc2
    Attributes
        ID   : 28
        Scope: local
        Value: 0
    
Variable (int32) ycR
    Attributes
        ID   : 29
        Scope: local
        Value: 0
    
Text d1Icon
    Attributes
        ID                  : 17
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 15
        y coordinate        : 85
        Width               : 30
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 1
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text d1Val
    Attributes
        ID                  : 16
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 50
        y coordinate        : 85
        Width               : 100
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: left
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text d2Icon
    Attributes
        ID                  : 34
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 14
        y coordinate        : 117
        Width               : 30
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 1
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text d2Val
    Attributes
        ID                  : 33
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 50
        y coordinate        : 118
        Width               : 100
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: left
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text d3Icon
    Attributes
        ID                  : 35
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 14
        y coordinate        : 150
        Width               : 30
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 1
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text d3Val
    Attributes
        ID                  : 36
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 50
        y coordinate        : 151
        Width               : 100
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: left
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e1Icon
    Attributes
        ID                  : 11
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 5
        y coordinate        : 221
        Width               : 70
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 1
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e1Name
    Attributes
        ID                  : 9
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 5
        y coordinate        : 195
        Width               : 70
        Height              : 25
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e1Val
    Attributes
        ID                  : 10
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 5
        y coordinate        : 252
        Width               : 70
        Height              : 25
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e2Icon
    Attributes
        ID                  : 38
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 79
        y coordinate        : 221
        Width               : 70
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 1
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e2Name
    Attributes
        ID                  : 37
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 78
        y coordinate        : 195
        Width               : 70
        Height              : 25
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e2Val
    Attributes
        ID                  : 39
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 79
        y coordinate        : 252
        Width               : 70
        Height              : 25
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e3Icon
    Attributes
        ID                  : 41
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 153
        y coordinate        : 221
        Width               : 70
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 1
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e3Name
    Attributes
        ID                  : 40
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 153
        y coordinate        : 195
        Width               : 70
        Height              : 25
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e3Val
    Attributes
        ID                  : 42
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 153
        y coordinate        : 252
        Width               : 70
        Height              : 25
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e4Icon
    Attributes
        ID                  : 44
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 230
        y coordinate        : 221
        Width               : 70
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 1
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e4Name
    Attributes
        ID                  : 43
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 230
        y coordinate        : 195
        Width               : 70
        Height              : 25
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e4Val
    Attributes
        ID                  : 45
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 230
        y coordinate        : 252
        Width               : 70
        Height              : 25
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e5Icon
    Attributes
        ID                  : 47
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 304
        y coordinate        : 221
        Width               : 70
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 1
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e5Name
    Attributes
        ID                  : 46
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 304
        y coordinate        : 195
        Width               : 70
        Height              : 25
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e5Val
    Attributes
        ID                  : 48
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 304
        y coordinate        : 252
        Width               : 70
        Height              : 25
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e6Icon
    Attributes
        ID                  : 50
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 377
        y coordinate        : 221
        Width               : 70
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 1
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e6Name
    Attributes
        ID                  : 49
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 377
        y coordinate        : 195
        Width               : 70
        Height              : 25
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text e6Val
    Attributes
        ID                  : 51
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 377
        y coordinate        : 252
        Width               : 70
        Height              : 25
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text f1Icon
    Attributes
        ID                  : 56
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 168
        y coordinate        : 125
        Width               : 50
        Height              : 50
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 3
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
    Events
        Touch Press Event
            tSend.txt="event,buttonPress2,"+entn1.txt+",button"
            //send calc crc
            btlen tSend.txt,sys0
            crcrest 1,0xffff // reset CRC
            crcputh 55 bb
            crcputs sys0,2
            crcputs tSend.txt,0
            //send cmd
            printh 55 bb
            prints sys0,2
            prints tSend.txt,0
            prints crcval,2
        
Text f2Icon
    Attributes
        ID                  : 54
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 224
        y coordinate        : 125
        Width               : 50
        Height              : 50
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 3
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
    Events
        Touch Press Event
            tSend.txt="event,buttonPress2,"+entn2.txt+",button"
            //send calc crc
            btlen tSend.txt,sys0
            crcrest 1,0xffff // reset CRC
            crcputh 55 bb
            crcputs sys0,2
            crcputs tSend.txt,0
            //send cmd
            printh 55 bb
            prints sys0,2
            prints tSend.txt,0
            prints crcval,2
        
Text f3Icon
    Attributes
        ID                  : 55
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 280
        y coordinate        : 125
        Width               : 50
        Height              : 50
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 3
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
    Events
        Touch Press Event
            tSend.txt="event,buttonPress2,"+entn3.txt+",button"
            //send calc crc
            btlen tSend.txt,sys0
            crcrest 1,0xffff // reset CRC
            crcputh 55 bb
            crcputs sys0,2
            crcputs tSend.txt,0
            //send cmd
            printh 55 bb
            prints sys0,2
            prints tSend.txt,0
            prints crcval,2
        
Text f4Icon
    Attributes
        ID                  : 53
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 336
        y coordinate        : 125
        Width               : 50
        Height              : 50
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 3
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
    Events
        Touch Press Event
            tSend.txt="event,buttonPress2,"+entn4.txt+",button"
            //send calc crc
            btlen tSend.txt,sys0
            crcrest 1,0xffff // reset CRC
            crcputh 55 bb
            crcputs sys0,2
            crcputs tSend.txt,0
            //send cmd
            printh 55 bb
            prints sys0,2
            prints tSend.txt,0
            prints crcval,2
        
Text f5Icon
    Attributes
        ID                  : 52
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 392
        y coordinate        : 125
        Width               : 50
        Height              : 50
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 3
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
    Events
        Touch Press Event
            tSend.txt="event,buttonPress2,"+entn5.txt+",button"
            //send calc crc
            btlen tSend.txt,sys0
            crcrest 1,0xffff // reset CRC
            crcputh 55 bb
            crcputs sys0,2
            crcputs tSend.txt,0
            //send cmd
            printh 55 bb
            prints sys0,2
            prints tSend.txt,0
            prints crcval,2
        
Text m0
    Attributes
        ID                  : 32
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 463
        y coordinate        : 0
        Width               : 17
        Height              : 320
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 63488
        Font Color          : 0
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
    Events
        Touch Press Event
            tTmp.txt="change model conf to us-l/p "
            strlen tTmp.txt,sys1
            sya1=sys1*11+m0.h-48/2
            for(sys0=0;sys0<sys1;sys0++)
            {
                substr tTmp.txt,strTmp.txt,sys0,1
                xstr m0.x-5,sys0*-11+m0.y+sya1,23,20,6,WHITE,RED,2,1,3,strTmp.txt
            }
        
Text tAMPM
    Attributes
        ID                  : 13
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 409
        y coordinate        : 30
        Width               : 40
        Height              : 32
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : PM
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text tDate
    Attributes
        ID                  : 6
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 175
        y coordinate        : 76
        Width               : 263
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: right
        Vertical Alignment  : center
        Input Type          : character
        Text                : Thursday, 02.02
        Max. Text Size      : 30
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text tIcon1
    Attributes
        ID                  : 21
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 0
        y coordinate        : 280
        Width               : 223
        Height              : 40
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 1
        Back. Color         : 0
        Font Color          : 17299
        Horizontal Alignment: center
        Vertical Alignment  : top
        Input Type          : character
        Text                : 
        Max. Text Size      : 16
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text tIcon2
    Attributes
        ID                  : 22
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 227
        y coordinate        : 280
        Width               : 222
        Height              : 40
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 1
        Back. Color         : 0
        Font Color          : 17299
        Horizontal Alignment: center
        Vertical Alignment  : top
        Input Type          : character
        Text                : 
        Max. Text Size      : 16
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text tMainIcon
    Attributes
        ID                  : 7
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 14
        y coordinate        : 15
        Width               : 70
        Height              : 65
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 4
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 4
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text tMainText
    Attributes
        ID                  : 8
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 85
        y coordinate        : 50
        Width               : 82
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 1
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : center
        Input Type          : character
        Text                : 
        Max. Text Size      : 10
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text tNotifyHead
    Attributes
        ID                  : 57
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 0
        y coordinate        : 181
        Width               : 448
        Height              : 40
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 3
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : top
        Input Type          : character
        Text                : 
        Max. Text Size      : 35
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text tNotifyText
    Attributes
        ID                  : 58
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 0
        y coordinate        : 221
        Width               : 448
        Height              : 58
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 0
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : top
        Input Type          : character
        Text                : 
        Max. Text Size      : 120
        Word wrap           : enabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text tTime
    Attributes
        ID                  : 5
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 251
        y coordinate        : 15
        Width               : 192
        Height              : 60
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 4
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: right
        Vertical Alignment  : center
        Input Type          : character
        Text                : 21:32
        Max. Text Size      : 15
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Text tTimeAdd
    Attributes
        ID                  : 23
        Scope               : local
        Dragging            : 0
        Send Component ID   : disabled
        Opacity             : 127
        x coordinate        : 90
        y coordinate        : 15
        Width               : 153
        Height              : 30
        Effect              : load
        Effect Priority     : 0
        Effect Time         : 300
        Fill                : solid color
        Style               : flat
        Associated Keyboard : none
        Font ID             : 2
        Back. Color         : 0
        Font Color          : 65535
        Horizontal Alignment: center
        Vertical Alignment  : bottom
        Input Type          : character
        Text                : 
        Max. Text Size      : 20
        Word wrap           : disabled
        Horizontal Spacing  : 0
        Vertical Spacing    : 0
    
Picture p0
    Attributes
        ID               : 1
        Scope            : local
        Dragging         : 0
        Send Component ID: disabled
        Opacity          : 127
        x coordinate     : 0
        y coordinate     : 1
        Width            : 479
        Height           : 319
        Effect           : load
        Effect Priority  : 0
        Effect Time      : 300
        Picture ID       : 0
    
Timer tm0
    Attributes
        ID         : 24
        Scope      : local
        Period (ms): 50
        Enabled    : yes
    
    Events
        Timer Event
            if(tc0.val!=0)
            {
                xc2.val=tch0
                yc2.val=tch1
            }
        
Timer tmSerial
    Attributes
        ID         : 3
        Scope      : local
        Period (ms): 50
        Enabled    : yes
    
    Events
        Timer Event
            // data available
            if(usize>1)
            {
                bufferPos=0
                while(bufferPos<usize)
                {
                    // check for 0x55 0xBB - Command Init Secuence
                    if(u[bufferPos]==187&&u[bufferPos-1]==85)
                    {
                        //remove garbage at the start of the buffer if there's any to free buffer for command
                        if(u[bufferPos]!=1)
                        {
                            udelete bufferPos-1
                        }
                        //instruction is now aligned with buffer, because we deleted garbage before instrcution
                        //get length after init sequence (check if there are more than to bytes in buffer)
                        if(3<usize)
                        {
                            // check if serial buffer has reached the announced length
                            ucopy payloadLength,2,2,0
                            // we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
                            payloadLength+=3
                            // payload length does also not contain crc, so we are adding another 2 bytes for crc
                            payloadLength+=2
                            if(payloadLength<usize)
                            {
                                // calculate crc
                                crcrest 1,0xFFFF
                                // u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
                                //crcputu 3,u[2]
                                // u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
                                crcputu 0,payloadLength-1
                                // get recived crc to be able to compare it
                                ucopy recvCrc,payloadLength-1,2,0
                                // compare crc with recived value
                                if(crcval==recvCrc)
                                {
                                    // crc is okay
                                    // here is the location where acual code should be
                                    // write command to variable strCommand
                                    ucopy strCommand.txt,4,payloadLength-5,0
                                    // write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
                                    spstr strCommand.txt,tInstruction.txt,"~",0
                                    if(tInstruction.txt=="wake")
                                    {
                                        click tc0,1
                                    }
                                    if(tInstruction.txt=="dimmode")
                                    {
                                        // get value
                                        spstr strCommand.txt,tTmp.txt,"~",1
                                        covx tTmp.txt,dimValue,0,0
                                        dim=dimValue
                                        // get value normal
                                        spstr strCommand.txt,tTmp.txt,"~",2
                                        covx tTmp.txt,dimValueNormal,0,0
                                        // get background color
                                        spstr strCommand.txt,tTmp.txt,"~",3
                                        if(tTmp.txt!="")
                                        {
                                            covx tTmp.txt,defaultBcoColor,0,0
                                        }
                                        // get font color
                                        spstr strCommand.txt,tTmp.txt,"~",4
                                        if(tTmp.txt!="")
                                        {
                                            covx tTmp.txt,defaultFontColor,0,0
                                        }
                                    }
                                    if(tInstruction.txt=="time")
                                    {
                                        click m0,1
                                        //get set time to global variable
                                        spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
                                        spstr pageIcons.vaTime.txt,tTime.txt,"?",0
                                        spstr pageIcons.vaTime.txt,tAMPM.txt,"?",1
                                        if(tAMPM.txt=="")
                                        {
                                            vis tAMPM,0
                                        }
                                        spstr strCommand.txt,tTimeAdd.txt,"~",2
                                        ref tIcon1
                                        ref tIcon2
                                    }
                                    if(tInstruction.txt=="date")
                                    {
                                        //get set date to global variable
                                        spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
                                        tDate.txt=pageIcons.vaDate.txt
                                    }
                                    if(tInstruction.txt=="statusUpdate")
                                    {
                                        //statusIcon1
                                        spstr strCommand.txt,tIcon1.txt,"~",1
                                        spstr strCommand.txt,tTmp.txt,"~",2
                                        covx tTmp.txt,tIcon1.pco,0,0
                                        //statusIcon2
                                        spstr strCommand.txt,tIcon2.txt,"~",3
                                        spstr strCommand.txt,tTmp.txt,"~",4
                                        covx tTmp.txt,tIcon2.pco,0,0
                                        spstr strCommand.txt,tTmp.txt,"~",5
                                        if(tTmp.txt!="")
                                        {
                                            tIcon1.font=3
                                        }
                                        spstr strCommand.txt,tTmp.txt,"~",6
                                        if(tTmp.txt!="")
                                        {
                                            tIcon2.font=3
                                        }
                                    }
                                    if(tInstruction.txt=="weatherUpdate"&&tNotifyHead.txt==""&&tNotifyText.txt=="")
                                    {
                                        //tMainIcon
                                        spstr strCommand.txt,tMainIcon.txt,"~",3
                                        //tMainIcon Color
                                        spstr strCommand.txt,tTmp.txt,"~",4
                                        covx tTmp.txt,tMainIcon.pco,0,0
                                        //tMainText
                                        spstr strCommand.txt,tMainText.txt,"~",6
                                        //d1Icon
                                        spstr strCommand.txt,d1Icon.txt,"~",9
                                        //d1Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",10
                                        covx tTmp.txt,d1Icon.pco,0,0
                                        //d1Val
                                        spstr strCommand.txt,d1Val.txt,"~",12
                                        //d2Icon
                                        spstr strCommand.txt,d2Icon.txt,"~",15
                                        //d2Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",16
                                        covx tTmp.txt,d2Icon.pco,0,0
                                        //d2Val
                                        spstr strCommand.txt,d2Val.txt,"~",18
                                        //d3Icon
                                        spstr strCommand.txt,d3Icon.txt,"~",21
                                        //d3Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",22
                                        covx tTmp.txt,d3Icon.pco,0,0
                                        //d3Val
                                        spstr strCommand.txt,d3Val.txt,"~",24
                                        //e1Name
                                        spstr strCommand.txt,e1Name.txt,"~",29
                                        //e1Icon
                                        spstr strCommand.txt,e1Icon.txt,"~",27
                                        //e1Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",28
                                        covx tTmp.txt,e1Icon.pco,0,0
                                        //e1Val
                                        spstr strCommand.txt,e1Val.txt,"~",30
                                        //e2Name
                                        spstr strCommand.txt,e2Name.txt,"~",35
                                        //e2Icon
                                        spstr strCommand.txt,e2Icon.txt,"~",33
                                        //e2Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",34
                                        covx tTmp.txt,e2Icon.pco,0,0
                                        //e2Val
                                        spstr strCommand.txt,e2Val.txt,"~",36
                                        //e3Name
                                        spstr strCommand.txt,e3Name.txt,"~",41
                                        //e3Icon
                                        spstr strCommand.txt,e3Icon.txt,"~",39
                                        //e3Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",40
                                        covx tTmp.txt,e3Icon.pco,0,0
                                        //e3Val
                                        spstr strCommand.txt,e3Val.txt,"~",42
                                        //e4Name
                                        spstr strCommand.txt,e4Name.txt,"~",47
                                        //e4Icon
                                        spstr strCommand.txt,e4Icon.txt,"~",45
                                        //e4Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",46
                                        covx tTmp.txt,e4Icon.pco,0,0
                                        //e4Val
                                        spstr strCommand.txt,e4Val.txt,"~",48
                                        //e5Name
                                        spstr strCommand.txt,e5Name.txt,"~",53
                                        //e5Icon
                                        spstr strCommand.txt,e5Icon.txt,"~",51
                                        //e5Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",52
                                        covx tTmp.txt,e5Icon.pco,0,0
                                        //e5Val
                                        spstr strCommand.txt,e5Val.txt,"~",54
                                        //e6Name
                                        spstr strCommand.txt,e6Name.txt,"~",59
                                        //e6Icon
                                        spstr strCommand.txt,e6Icon.txt,"~",57
                                        //e6Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",58
                                        covx tTmp.txt,e6Icon.pco,0,0
                                        //e6Val
                                        spstr strCommand.txt,e6Val.txt,"~",60
                                        //f1Icon
                                        spstr strCommand.txt,f1Icon.txt,"~",63
                                        //f1Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",64
                                        covx tTmp.txt,f1Icon.pco,0,0
                                        //f1Icon intNameEntity
                                        spstr strCommand.txt,entn1.txt,"~",62
                                        //f2Icon
                                        spstr strCommand.txt,f2Icon.txt,"~",69
                                        //f2Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",70
                                        covx tTmp.txt,f2Icon.pco,0,0
                                        //f2Icon intNameEntity
                                        spstr strCommand.txt,entn2.txt,"~",68
                                        //f3Icon
                                        spstr strCommand.txt,f3Icon.txt,"~",75
                                        //f3Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",76
                                        covx tTmp.txt,f3Icon.pco,0,0
                                        //f3Icon intNameEntity
                                        spstr strCommand.txt,entn3.txt,"~",74
                                        //f4Icon
                                        spstr strCommand.txt,f4Icon.txt,"~",81
                                        //f4Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",82
                                        covx tTmp.txt,f4Icon.pco,0,0
                                        //f4Icon intNameEntity
                                        spstr strCommand.txt,entn4.txt,"~",80
                                        //f5Icon
                                        spstr strCommand.txt,f5Icon.txt,"~",87
                                        //f5Icon Color
                                        spstr strCommand.txt,tTmp.txt,"~",88
                                        covx tTmp.txt,f5Icon.pco,0,0
                                        //f5Icon intNameEntity
                                        spstr strCommand.txt,entn5.txt,"~",86
                                    }
                                    if(tInstruction.txt=="notify")
                                    {
                                        spstr strCommand.txt,tNotifyHead.txt,"~",1
                                        spstr strCommand.txt,tNotifyText.txt,"~",2
                                        if(tNotifyHead.txt!=""||tNotifyText.txt!="")
                                        {
                                            vis tNotifyHead,1
                                            vis tNotifyText,1
                                        }else
                                        {
                                            vis tNotifyHead,0
                                            vis tNotifyText,0
                                        }
                                        tNotifyHead.bco=tTime.bco
                                        tNotifyText.bco=tTime.bco
                                        spstr strCommand.txt,tTmp.txt,"~",3
                                        if(tTmp.txt!="")
                                        {
                                            covx tTmp.txt,tNotifyHead.pco,0,0
                                        }
                                        spstr strCommand.txt,tTmp.txt,"~",4
                                        if(tTmp.txt!="")
                                        {
                                            covx tTmp.txt,tNotifyText.pco,0,0
                                        }
                                    }
                                    if(tInstruction.txt=="pageType")
                                    {
                                        dim=100
                                        //command format pageType,specialPageName
                                        //write name of speical page to tId
                                        spstr strCommand.txt,tId.txt,"~",1
                                        //save second arg if there's one
                                        spstr strCommand.txt,tTmp.txt,"~",2
                                        //save third arg if there's one
                                        spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
                                        spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4
                                        //we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
                                        udelete payloadLength-1
                                        bufferPos=0
                                        if(tId.txt=="pageStartup")
                                        {
                                            page pageStartup
                                        }
                                        if(tId.txt=="screensaver")
                                        {
                                            page screensaver
                                        }
                                        if(tId.txt=="screensaver2")
                                        {
                                            page screensaver2
                                        }
                                        if(tId.txt=="cardEntities")
                                        {
                                            page cardEntities
                                        }
                                        if(tId.txt=="cardGrid")
                                        {
                                            page cardGrid
                                        }
                                        if(tId.txt=="cardGrid2")
                                        {
                                            page cardGrid2
                                        }
                                        if(tId.txt=="popupLight")
                                        {
                                            pageIcons.tTmp1.txt=tTmp.txt
                                            page popupLight
                                        }
                                        if(tId.txt=="popupShutter")
                                        {
                                            pageIcons.tTmp1.txt=tTmp.txt
                                            page popupShutter
                                        }
                                        if(tId.txt=="popupNotify")
                                        {
                                            page popupNotify
                                        }
                                        if(tId.txt=="cardThermo")
                                        {
                                            page cardThermo
                                        }
                                        if(tId.txt=="cardMedia")
                                        {
                                            page cardMedia
                                        }
                                        if(tId.txt=="cardAlarm")
                                        {
                                            page cardAlarm
                                        }
                                        if(tId.txt=="cardQR")
                                        {
                                            page cardQR
                                        }
                                        if(tId.txt=="cardPower")
                                        {
                                            page cardPower
                                        }
                                        if(tId.txt=="cardChart")
                                        {
                                            page cardChart
                                        }
                                    }
                                    if(tInstruction.txt=="timeout")
                                    {
                                        //set timeout to global var
                                        spstr strCommand.txt,tTmp.txt,"~",1
                                        covx tTmp.txt,sleepTimeout,0,0
                                    }
                                    // end of user code
                                    udelete payloadLength-1
                                    bufferPos=0
                                }
                            }
                        }
                    }
                    // next character
                    bufferPos++
                }
            }
        
Timer tmSleep
    Attributes
        ID         : 15
        Scope      : local
        Period (ms): 1000
        Enabled    : yes
    
    Events
        Timer Event
            if(sleepTimeout!=0&&dimValue!=dim)
            {
                sleepValue+=1
                if(sleepTimeout<=sleepValue)
                {
                    sleepValue=0
                    dim=dimValue
                    vaTap.val=0
                }
            }
        
TouchCap tc0
    Attributes
        ID   : 2
        Scope: local
        Value: 0
    
    Events
        Touch Press Event
            xc1.val=tch0
            yc1.val=tch1
            tm0.en=1
            if(tNotifyHead.txt!=""||tNotifyText.txt!="")
            {
                if(dim!=0)
                {
                    tNotifyHead.txt=""
                    tNotifyText.txt=""
                    vis tNotifyHead,0
                    vis tNotifyText,0
                }
            }
            dim=dimValueNormal
            vaTap.val+=1
            covx vaTap.val,tTmp.txt,0,0
            tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt
            //send calc crc
            //btlen tSend.txt,sys0
            //crcrest 1,0xffff // reset CRC
            //crcputh 55 bb
            //crcputs sys0,2
            //crcputs tSend.txt,0
            //send cmd
            //printh 55 bb
            //prints sys0,2
            //prints tSend.txt,0
            //prints crcval,2
        
        Touch Release Event
            tm0.en=0
            if(tch0==0)
            // When this is zero we can interpret that as the real end of the drag event
            {
                xcR.val=xc1.val-xc2.val
                ycR.val=yc1.val-yc2.val
                // new method
                // one of the difference values should be low to be a valid direction, in case it has a high value it's not a valid swipe, because it's diagonal
                // x difference between -125 and 125 (swipe on y-axis)
                if(xcR.val>-125&&xcR.val<125)
                {
                    //tStatusNew.txt="x low, -> y"
                    // check if below minimum value (change is negative)
                    if(ycR.val<-80)
                    {
                        //tDirNew.txt="down"
                        tSend.txt="event,buttonPress2,screensaver,swipeDown"
                    }else if(ycR.val>80)
                    {
                        //tDirNew.txt="up"
                        tSend.txt="event,buttonPress2,screensaver,swipeUp"
                    }else
                    {
                        //tDirNew.txt="invalid"
                    }
                    // y difference between -125 and 125 (swipe on x-axis)
                }else if(ycR.val>-125&&ycR.val<125)
                {
                    //tStatusNew.txt="y low, -> x"
                    if(xcR.val<-80)
                    {
                        //tDirNew.txt="right"
                        tSend.txt="event,buttonPress2,screensaver,swipeRight"
                    }else if(xcR.val>80)
                    {
                        //tDirNew.txt="left"
                        tSend.txt="event,buttonPress2,screensaver,swipeLeft"
                    }else
                    {
                        //tDirNew.txt="invalid"
                    }
                    //diagonal swipe invalid
                }else
                {
                    //tStatusNew.txt="invalid"
                    //tDirNew.txt="diagonal"
                }
            }
            //send calc crc
            btlen tSend.txt,sys0
            crcrest 1,0xffff // reset CRC
            crcputh 55 bb
            crcputs sys0,2
            crcputs tSend.txt,0
            //send cmd
            printh 55 bb
            prints sys0,2
            prints tSend.txt,0
            prints crcval,2
        
