Пример #1
0
def drawmood():
    if ci.fcmode == 0:
        ci.cl_screen.blit(ci.mood_col[ci.moodc], (0, 20))  # top light
        ci.cl_screen.blit(ci.mood_col[ci.moodc], (0, 380))  # bottom light
    elif ci.fcmode == 1:
        ci.cl_screen.blit(ci.mood_col[ci.moodc], (0, 20))  # top light
        ci.cl_screen.blit(ci.mood_col[ci.moodc], (0, 70))  # bottom light
    elif ci.fcmode == 2:
        pass
    elif ci.fcmode == 3:

    # ci.cl_screen.blit(ci.mood_bas,(0,440))            ....#bottom light
                                                                      # WINDO MODE

        ci.cl_screen.blit(ci.mood_col[ci.moodc], (0, 0))  # top light
    elif ci.fcmode == 5:

                                                                      # Alarm is playing

        ci.pygame.draw.rect(ci.cl_screen, (255, 255, 255), (0, 380,
                            800, 100))
        ci.cl_screen.blit(ci.mood_col[2], (0, 380))  # bottom light
    if ci.tablet:
        ci_alarm.led()
    ci.pygame.display.flip()
Пример #2
0
def mood():
    global g_mood
    print "il mood adesso e':", _init.moodc
    screen.blit(g_mood[_init.moodc], (0, 17))
    screen.blit(g_mood[_init.moodc], (0, 70))
    if _init.sw_led == 1:
        if _init.moodc == 0:

      # ledrgb[]=0,0,0

            r = 0
            g = 0
            b = 0
            ci_alarm.led(r, g, b)
            print r, g, b
        elif _init.moodc == 1:
            r = 250
            g = 125
            b = 0
            ci_alarm.led(r, g, b)
            print r, g, b
        elif _init.moodc == 2:
            r = 0
            g = 0
            b = 250
            ci_alarm.led(r, g, b)
            print r, g, b
        elif _init.moodc == 3:
            r = 250
            g = 0
            b = 0
            ci_alarm.led(r, g, b)
            print r, g, b
        elif _init.moodc == 4:
            r = 250
            g = 0
            b = 125
            ci_alarm.led(r, g, b)
            print r, g, b
    pygame.display.flip()
Пример #3
0
def moodtablet():
    if ci.moodc == 0:
        ci.r = 0
        ci.g = 0
        ci.b = 0
    elif ci.moodc == 1:
        ci.r = 250
        ci.g = 125
        ci.b = 0
    elif ci.moodc == 2:
        ci.r = 0
        ci.g = 0
        ci.b = 250
    elif ci.moodc == 3:
        ci.r = 250
        ci.g = 0
        ci.b = 0
    elif ci.moodc == 4:
        r = 250
        g = 0
        b = 125
    ci_alarm.led()