Skip to content

Commit

Permalink
Merge pull request #521 from MLB-LED-Scoreboard/matrix-priv-drop
Browse files Browse the repository at this point in the history
Do not drop root privilege when running in venv
  • Loading branch information
ty-porter authored Feb 28, 2024
2 parents 0adc6c4 + 14d41d8 commit 1d7d5d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ You can configure your LED matrix with the same flags used in the [rpi-rgb-led-m
--led-pwm-dither-bits Time dithering of lower bits (Default: 0)
--config Specify a configuration file name other, omitting json xtn (Default: config)
--emulated Force the scoreboard to run in software emulation mode.
--drop-privileges Force the matrix driver to drop root privileges after setup. (Default: true)
```

## Personalization
Expand Down
4 changes: 4 additions & 0 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ def args():
help="Force using emulator mode over default matrix display.",
const=True
)
parser.add_argument(
"--drop-privileges", action="store_true", help="Force the matrix driver to drop root privileges after setup."
)
return parser.parse_args()


Expand All @@ -148,6 +151,7 @@ def led_matrix_options(args):
options.scan_mode = args.led_scan_mode
options.pwm_lsb_nanoseconds = args.led_pwm_lsb_nanoseconds
options.led_rgb_sequence = args.led_rgb_sequence
options.drop_privileges = args.drop_privileges

try:
options.pixel_mapper_config = args.led_pixel_mapper
Expand Down

0 comments on commit 1d7d5d8

Please sign in to comment.