Skip to content
Snippets Groups Projects
Commit 9f62fb67 authored by Jevgeni Kiski's avatar Jevgeni Kiski
Browse files

Orange Pi. Schema: mode.default=bcm

parent 7167c29e
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,9 @@ CONFIG_SCHEMA = {
},
"mode": {
"type": "string",
"required": False,
"required": True,
"empty": False,
"default": "bcm",
"allowed": ALLOWED_MODES + list(map(str.upper, ALLOWED_MODES))
}
}
......@@ -44,7 +45,7 @@ class GPIO(GenericGPIO):
}
board = config["board"].upper()
mode = config.get("mode", "bcm").upper()
mode = config["mode"].upper()
if not hasattr(gpio, board):
raise AssertionError("%s board not found" % board)
gpio.setboard(getattr(gpio, board))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment