hog server config file can be specified
This commit is contained in:
parent
92656f7676
commit
b775e51633
|
@ -1 +1 @@
|
|||
Subproject commit c392edccf7608d8699e6d1c4d7cd9182ff583a41
|
||||
Subproject commit a34327a874af02398fcbe020c4dd06b4c0433579
|
|
@ -18,7 +18,7 @@ import argparse
|
|||
import configparser
|
||||
import logging
|
||||
from signal import pause
|
||||
from baconscript import comment
|
||||
from baconscript import comment, HogNet, LISTENER, load_servers
|
||||
from gpiozero import Button, GPIODeviceError
|
||||
|
||||
# use mock pins when not working on Pi hardware
|
||||
|
@ -47,6 +47,7 @@ def main():
|
|||
## output header
|
||||
print(f"Version: {__version__}\t{__copyright__}")
|
||||
## load config files
|
||||
LISTENER.osc = HogNet(load_servers(args.servers))
|
||||
load_config(args.buttons)
|
||||
## run the event loop
|
||||
try:
|
||||
|
@ -62,6 +63,8 @@ def get_command_arguments():
|
|||
epilog=__copyright__)
|
||||
parser.add_argument('-b', '--buttons', default="buttons.cfg",
|
||||
help="button configuration file")
|
||||
parser.add_argument('-s', '--servers', default="server.cfg",
|
||||
help="OSC servers configuration file")
|
||||
parser.add_argument('-q', '--quiet', action='store_true',
|
||||
help="sets the default log level to 0, otherwise 3.")
|
||||
parser.add_argument("-v", dest="verbosity",
|
||||
|
|
Loading…
Reference in New Issue