コード例 #1
0
ファイル: demo.py プロジェクト: ymz000/BiblioPixel
def run():
    common.test_prompt('demo')
    for i, demo in enumerate(('bloom', 'circle', 'cube', 'matrix')):
        if i:
            common.execute('bp', 'demo', demo, '--pl=3', '--simpixel=no')
        else:
            common.execute('bp', 'demo', demo, '--pl=3')
コード例 #2
0
ファイル: builder.py プロジェクト: ymz000/BiblioPixel
def run():
    common.test_prompt('builder')

    with tempfile.TemporaryDirectory() as td:
        save_file = os.path.join(td, SAVE_FILE)
        pb = Builder()
        desc = pb.desc
        desc.shape = 32
        desc.animation = '.tests.PixelTester'
        pb.simpixel()

        def stop():
            time.sleep(2)
            pb.stop()

        def start_and_stop():
            threading.Thread(daemon=True, target=stop).start()
            pb.start()

        start_and_stop()

        pb.save(save_file)
        pb.clear()

        pb = Builder(save_file)
        start_and_stop()

        pb.danimation = StripChannelTest
        start_and_stop()

        pb.animation = '$bpa.strip.Wave'
        pb.threaded = True
        pb.start()
        time.sleep(2)
        pb.project.animation.palette[0] = 'green'
        pb.stop()
        pb = None

        # TODO: why do we only have to do this for this one test?
        SimPixel.close_all()
コード例 #3
0
ファイル: simpixel.py プロジェクト: ymz000/BiblioPixel
def run():
    common.test_prompt('simpixel')
    common.run_project(*PROJECTS, flag='-s')
コード例 #4
0
def run():
    common.test_prompt('remote')
    common.run_project(PROJECT, flag='-s')
コード例 #5
0
ファイル: keyboard.py プロジェクト: ymz000/BiblioPixel
def run():
    common.test_prompt('keyboard')
    common.run_project('keyboard.yml')
コード例 #6
0
ファイル: classic.py プロジェクト: ymz000/BiblioPixel
def run():
    import common
    common.test_prompt('classic')
    common.execute('python', __file__)