Fix docstrings in Python example (#78)
This commit is contained in:
parent
08163c0681
commit
02d5c468a2
|
@ -54,12 +54,12 @@ team = None
|
||||||
server = False
|
server = False
|
||||||
cameraConfigs = []
|
cameraConfigs = []
|
||||||
|
|
||||||
"""Report parse error."""
|
|
||||||
def parseError(str):
|
def parseError(str):
|
||||||
|
"""Report parse error."""
|
||||||
print("config error in '" + configFile + "': " + str, file=sys.stderr)
|
print("config error in '" + configFile + "': " + str, file=sys.stderr)
|
||||||
|
|
||||||
"""Read single camera configuration."""
|
|
||||||
def readCameraConfig(config):
|
def readCameraConfig(config):
|
||||||
|
"""Read single camera configuration."""
|
||||||
cam = CameraConfig()
|
cam = CameraConfig()
|
||||||
|
|
||||||
# name
|
# name
|
||||||
|
@ -84,8 +84,8 @@ def readCameraConfig(config):
|
||||||
cameraConfigs.append(cam)
|
cameraConfigs.append(cam)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
"""Read configuration file."""
|
|
||||||
def readConfig():
|
def readConfig():
|
||||||
|
"""Read configuration file."""
|
||||||
global team
|
global team
|
||||||
global server
|
global server
|
||||||
|
|
||||||
|
@ -131,8 +131,8 @@ def readConfig():
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
"""Start running the camera."""
|
|
||||||
def startCamera(config):
|
def startCamera(config):
|
||||||
|
"""Start running the camera."""
|
||||||
print("Starting camera '{}' on {}".format(config.name, config.path))
|
print("Starting camera '{}' on {}".format(config.name, config.path))
|
||||||
inst = CameraServer.getInstance()
|
inst = CameraServer.getInstance()
|
||||||
camera = UsbCamera(config.name, config.path)
|
camera = UsbCamera(config.name, config.path)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user