Esempio n. 1
0
def d_cdScanBackward(packet):
  if not AIRPLAY:
    cdSongHundreds, cdSong = _getTrackNumber()
    pB_display.cleardisplay():
    WRITER.writeBusPacket('18', '68', ['39', '04', '09', '00', '3F', '00', cdSongHundreds, cdSong]) # Fast backward scan signal
    if "".join(packet['dat']) == "380400":
      pB_ticker.enableFunc("scanBackward", 0.2)
Esempio n. 2
0
def d_cdScanForward(packet):
    if not BLUETOOTH:
        cdSongHundreds, cdSong = _getTrackNumber()
        if "".join(packet['dat']) == "380401":
            WRITER.writeBusPacket(
                '18', '68',
                ['39', '03', '09', '00', '3F', '00', cdSongHundreds, cdSong
                 ])  # Fast forward scan signal
            pB_ticker.enableFunc("scanForward", 0.2)
Esempio n. 3
0
def d_cdScanBackward(packet):
    if not AIRPLAY:
        cdSongHundreds, cdSong = _getTrackNumber()
        WRITER.writeBusPacket('c8', '80', [
            '23', '42', '32', '1e'
        ])  #clear IKEConsole LCD of messages before filling it with MPD info
        WRITER.writeBusPacket(
            '18', '68',
            ['39', '04', '09', '00', '3F', '00', cdSongHundreds, cdSong
             ])  # Fast backward scan signal
        if "".join(packet['dat']) == "380400":
            pB_ticker.enableFunc("scanBackward", 0.2)
Esempio n. 4
0
def init(writer):
  global WRITER, SESSION_DATA
  WRITER = writer

  pB_display.init(WRITER)
  pB_audio.init()
  pB_ticker.init(WRITER)
  
  pB_ticker.enableFunc("announce", 10)

  SESSION_DATA["DOOR_LOCKED"] = False
  SESSION_DATA["SPEED_SWITCH"] = False

  pB_display.immediateText('PyBus Up')
  WRITER.writeBusPacket('3F', '00', ['0C', '4E', '01']) # Turn on the 'clown nose' for 3 seconds
Esempio n. 5
0
def init(writer):
  global WRITER, SESSION_DATA
  WRITER = writer

  pB_display.init(WRITER)
  pB_audio.init()
  pB_ticker.init(WRITER)
  
  pB_ticker.enableFunc("announce", 10)

  SESSION_DATA["DOOR_LOCKED"] = False
  SESSION_DATA["SPEED_SWITCH"] = False
  
  pB_display.cleardisplay():
  pB_display.immediateText('PyBus Up')
  WRITER.writeBusPacket('3F', '00', ['0C', '4E', '01']) # Turn on the 'clown nose' for 3 seconds
Esempio n. 6
0
def init(writer):
    global WRITER, SESSION_DATA
    WRITER = writer

    pB_display.init(WRITER)
    pB_audio.init()
    pB_ticker.init(WRITER)

    pB_ticker.enableFunc("announce", 10)

    SESSION_DATA["DOOR_LOCKED"] = False
    SESSION_DATA["SPEED_SWITCH"] = False

    WRITER.writeBusPacket(
        'c8', '80',
        ['23', '42', '32', '1e'
         ])  #clear IKEConsole LCD of messages before filling it with MPD info
    pB_display.immediateText('PyBus Up')
    WRITER.writeBusPacket(
        '3F', '00',
        ['0C', '4E', '01'])  # Turn on the 'clown nose' for 3 seconds
Esempio n. 7
0
def d_cdPollResponse(packet):
    pB_ticker.disableFunc("announce")  # stop announcing
    pB_ticker.disableFunc("pollResponse")
    pB_ticker.enableFunc("pollResponse", 30)
    WRITER.writeBusPacket(
        '68', 'c0', ['21', '40', '00', '09', '05', '05', '4D', '50', '53'])
Esempio n. 8
0
def d_cdPollResponse(packet):
  pB_ticker.disableFunc("announce") # stop announcing
  pB_ticker.disableFunc("pollResponse")
  pB_ticker.enableFunc("pollResponse", 30)
Esempio n. 9
0
def d_cdScanBackward(packet):
  if not AIRPLAY:
    cdSongHundreds, cdSong = _getTrackNumber()
    WRITER.writeBusPacket('18', '68', ['39', '04', '09', '00', '3F', '00', cdSongHundreds, cdSong]) # Fast backward scan signal
    if "".join(packet['dat']) == "380400":
      pB_ticker.enableFunc("scanBackward", 0.2)
Esempio n. 10
0
def d_cdPollResponse(packet):
    pB_ticker.disableFunc("announce")  # stop announcing
    pB_ticker.disableFunc("pollResponse")
    pB_ticker.enableFunc("pollResponse", 30)