-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a2f150
commit dd1b585
Showing
14 changed files
with
168 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
|
||
|
||
class Backend: | ||
|
||
def __init__(self, led_count): | ||
raise NotImplementedError("Could not load backend as it has not been implemented, go implement it!") | ||
raise NotImplementedError( | ||
"Could not load backend as it has not been implemented, go implement it!" | ||
) | ||
|
||
def set_led(self, led_index: int, on: bool): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,35 @@ | ||
import argparse | ||
import sys | ||
sys.path.append('./') | ||
|
||
sys.path.append("./") | ||
from lib.utils import add_camera_args | ||
from lib import L3D | ||
from lib.color_print import cprint, Col | ||
|
||
if __name__ == "__main__": | ||
|
||
parser = argparse.ArgumentParser(description='Tests your webcam and LED detection algorithms') | ||
parser = argparse.ArgumentParser( | ||
description="Tests your webcam and LED detection algorithms" | ||
) | ||
|
||
add_camera_args(parser) | ||
|
||
args = parser.parse_args() | ||
|
||
if args.width * args.height < 0: | ||
cprint("Failed to start camera checker as both camera width and height need to be provided", format=Col.FAIL) | ||
cprint( | ||
"Failed to start camera checker as both camera width and height need to be provided", | ||
format=Col.FAIL, | ||
) | ||
quit() | ||
|
||
l3d = L3D.L3D(args.device, args.exposure, args.threshold, width=args.width, height=args.height) | ||
l3d = L3D.L3D( | ||
args.device, args.exposure, args.threshold, width=args.width, height=args.height | ||
) | ||
|
||
cprint("Camera connected! Hold an LED up to the camera to check LED identification", format=Col.BLUE) | ||
cprint( | ||
"Camera connected! Hold an LED up to the camera to check LED identification", | ||
format=Col.BLUE, | ||
) | ||
|
||
l3d.show_debug() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.