Exemple #1
0
    def __init__(self):
        matrix = OPCMatrix(M_WIDTH, M_HEIGHT, "echo", fliplr=True)
        arts = ImportPlugins("art", ["template.py"], [], None, matrix,
                             config.config)

        if len(arts) == 0:
            matrix.terminate()
            print("Couldn't find any art to execute")
            exit(1)

        self.generator = self._frameGenerator(arts, matrix)
        self.packet = None
Exemple #2
0
def initialize():
    global generator

    matrix = OPCMatrix(M_WIDTH, M_HEIGHT, "raw")

    arts = ImportPlugins("art", ["template.py"], [], matrix)
    if len(arts) == 0:
        matrix.terminate()
        print "Couldn't find any art to execute"
        exit(1)

    generator = frameGenerator(arts, matrix)
Exemple #3
0
    def __init__(self):
        matrix = OPCMatrix(M_WIDTH, M_HEIGHT, "echo", fliplr=True)
        arts = ImportPlugins("art", ["template.py"], [], None, matrix,
                             config.config)

        if len(arts) == 0:
            matrix.terminate()
            print "Couldn't find any art to execute"
            exit(1)

        self.generator = self._frameGenerator(arts, matrix)
        self.packet = None
Exemple #4
0
def initialize():
    global generator

    matrix = OPCMatrix(M_WIDTH, M_HEIGHT, "raw")

    arts = ImportPlugins("art", ["template.py"], [], matrix)
    if len(arts) == 0:
        matrix.terminate()
        print("Couldn't find any art to execute")
        exit(1)

    generator = frameGenerator(arts, matrix)
Exemple #5
0
def main():
    global matrix

    parser = argparse.ArgumentParser()
    parser.add_argument("-c",
                        "--count",
                        type=int,
                        help="run for count cycles through all of the art",
                        default=DFLT_CYCLE_COUNT)
    parser.add_argument("-f",
                        "--fliptime",
                        type=int,
                        help="run art for FLIPTIME secs before transitioning",
                        default=DFLT_FLIPTIME_SECS)
    parser.add_argument("-p",
                        "--profile",
                        help="switch on and report profiling detail",
                        action="store_true")
    parser.add_argument("art", help="Optional list of arts", nargs="*")
    args = parser.parse_args()

    if args.profile:
        if args.count:
            prof.on()
        else:
            logging.error("Will not profile without --count being set")

    matrix = OPCMatrix(_v("WIDTH", 16), _v("HEIGHT", 16), _v("DRIVER", "ansi"),
                       _v("ZIGZAG", False), _v("FLIPUP", False),
                       _v("FLIPLR", False))

    progress(0, 10)

    arts = ImportPlugins("art", [], args.art, progress, matrix, config.config)
    if len(arts) == 0:
        matrix.terminate()
        print("Couldn't find any art to execute")
        exit(1)

    run(arts, args)
    matrixDone()

    if args.profile:
        prof.dumptimings()
Exemple #6
0
def main():
    global matrix

    parser = argparse.ArgumentParser()
    parser.add_argument("-c", "--count", type=int,
                        help="run for count cycles through all of the art",
                        default=DFLT_CYCLE_COUNT)
    parser.add_argument("-f", "--fliptime", type=int,
                        help="run art for FLIPTIME secs before transitioning",
                        default=DFLT_FLIPTIME_SECS)
    parser.add_argument("-p", "--profile",
                        help="switch on and report profiling detail",
                        action="store_true")
    parser.add_argument("art", help="Optional list of arts",
                        nargs="*")
    args = parser.parse_args()

    if args.profile:
        if args.count:
            prof.on()
        else:
            logging.error("Will not profile without --count being set")

    matrix = OPCMatrix(
        _v("WIDTH", 16), _v("HEIGHT", 16),
        _v("DRIVER", "ansi"), _v("ZIGZAG", False),
        _v("FLIPUP", False), _v("FLIPLR", False)
        )

    progress(0, 10)

    arts = ImportPlugins("art", [], args.art, progress,
                         matrix, config.config)
    if len(arts) == 0:
        matrix.terminate()
        print("Couldn't find any art to execute")
        exit(1)

    run(arts, args)
    matrixDone()

    if args.profile:
        prof.dumptimings()
Exemple #7
0
def main():
    global matrix

    parser = argparse.ArgumentParser()
    parser.add_argument("-c", "--count", type=int,
                        help="run for count cycles through all of the art",
                        default=DFLT_CYCLE_COUNT)
    parser.add_argument("-f", "--fliptime", type=int,
                        help="run art for FLIPTIME secs before transitioning",
                        default=DFLT_FLIPTIME_SECS)
    parser.add_argument("-p", "--profile",
                        help="switch on and report profiling detail",
                        action="store_true")
    parser.add_argument("art", help="Optional list of arts",
                        nargs="*")
    args = parser.parse_args()

    if args.profile:
        prof.on()

    matrix = OPCMatrix(
        _v("WIDTH", 16), _v("HEIGHT", 16),
        _v("ADDRESS", "ansi"), _v("ZIGZAG", False),
        _v("FLIPUP", False), _v("FLIPLR", False)
        )

    arts = ImportPlugins("art", ["template.py"], args.art, matrix)
    if len(arts) == 0:
        matrix.terminate()
        print "Couldn't find any art to execute"
        exit(1)

    run(arts, args)

    matrix.terminate()

    if args.profile:
        prof.dumptimings()