diff --git a/API/main.py b/API/main.py index 279e772..25b20fe 100755 --- a/API/main.py +++ b/API/main.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import os from deps.samplebase import SampleBase from rgbmatrix import graphics from PIL import Image @@ -268,6 +269,10 @@ def update_matrix(): class Matrix(SampleBase): def __init__(self, *args, **kwargs): super(Matrix, self).__init__(*args, **kwargs) + self.parser.add_argument("-r", "--led-rows", action="store", help="Display rows. 16 for 16x32, 32 for 32x32. Default: 64", default=int(os.getenv('PUBLIC_LED_WIDTH', 64)), type=int) + self.parser.add_argument("--led-cols", action="store", help="Panel columns. Typically 32 or 64. (Default: 64)", default=int(os.getenv('PUBLIC_LED_PARALLEL', 64)), type=int) + self.parser.add_argument("-c", "--led-chain", action="store", help="Daisy-chained boards. Default: 1.", default=int(os.getenv('PUBLIC_LED_CHAIN', 1)), type=int) + self.parser.add_argument("-P", "--led-parallel", action="store", help="For Plus-models or RPi2: parallel chains. 1..3. Default: 1", default=int(os.getenv('PUBLIC_LED_PARALLEL', 1)), type=int) # run display program def run(self):