mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 03:51:45 +00:00
overwrite cli args with dotenv
This commit is contained in:
parent
2a16383fea
commit
2a6eb11db5
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import os
|
||||||
from deps.samplebase import SampleBase
|
from deps.samplebase import SampleBase
|
||||||
from rgbmatrix import graphics
|
from rgbmatrix import graphics
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
@ -268,6 +269,10 @@ def update_matrix():
|
|||||||
class Matrix(SampleBase):
|
class Matrix(SampleBase):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(Matrix, self).__init__(*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
|
# run display program
|
||||||
def run(self):
|
def run(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user