Exemplo n.º 1
0
void displayTwitch(char name[], char title[], char game[]) {

    if (timerStruct(lastDisplayTime) % 10 < 5) {
        ClearLcd();
        if(strlen(name) < 16) {
            LcdArrayLineOne(name, strlen(name));
        }else {
            LcdArrayLineOne(name, 16);
        }
        LcdArrayLineTwo("is streaming    ", 16);
    }
    else {
        ClearLcd();
        if(strlen(title) > 16) {
            LcdArrayLineOne(title, 16);
        }else {
            LcdArrayLineOne(title, strlen(title));
        }if(strlen(game) > 16) {
            LcdArrayLineTwo(game, 16);
        }else{
            LcdArrayLineTwo(game, strlen(game));
        }
    }
    LcdBackLight(LCD_BACKLIGHT_ON);
}
Exemplo n.º 2
0
void displayTwitter(char* text)
{
    ClearLcd();
    LcdBackLight(LCD_BACKLIGHT_ON);
    LcdArrayLineOne("     Twitter    ", 16);
    int j = 0;
    int i;
    char text1[16];
    for(i = 0; i<140;i++){
        if (text[i] != 0){
            j++;
        }
    }

        for(i = 0; i < 16; i++){
            if (text[Scroller+i]!= 0) {
                text1[i] = text[Scroller + i];
            } else {
                text1[i] = ' ';
            }
        }
        LcdArrayLineTwo(text1,16);
        Scroller++;
        if (Scroller > j){
            Scroller = 0;
        }
}
Exemplo n.º 3
0
void showMenu()
{
    ClearLcd();
    LcdArrayLineOne("Main menu", 9);
    switch (isSettings)
    {
        case 0:
        {
            tm time;
            X12RtcGetClock(&time);
            char str1[16];
            sprintf(str1, "<   %02d:%02d:%02d   >", time.tm_hour, time.tm_min, time.tm_sec);
            LcdArrayLineTwo(str1, 16);
            break;
        }
        case 1:
        {
            showSettings();
            break;
        }
        case 2:
        {
            showPlay();
            break;
        }
    }
}
Exemplo n.º 4
0
void displayVolume()
{
    u_char pos = getVolume();
    int i;
    LcdArrayLineOne("     Volume     ", 16);

    char characters[17];

    for(i = 0; i < 17; i++)
    {
        if(i < pos) {
            characters[i] = 0xFF;
        }else {
            characters[i] = ' ';
        }
    }
    LcdArrayLineTwo(characters,16);
}