-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest.py
23 lines (16 loc) · 797 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from utils import log_utils
from tracker_core import tracker
from tracker_core import resolver
_PicRotCount = 0
# just a scratch pad for testing various libs and methods in isolation or other dependencies
def _resolve_cubestate():
# python rubiks-cube-tracker.py -f ./resource/jbrik_img/rubiks-side-62.png
cubestatestr = ""
for facenum in range(6, 7):
# Convert the photo of the face into a map of rgb values
facemap = tracker.jbrick_tracker.convert_face_pics_to_rgb_facemap(facenum, _PicRotCount)
# convert the map of face rgb values to cubeStateStr
cubestatestr += resolver.jbrik_resolver.resolve_colors(facemap, _PicRotCount)
return cubestatestr
CubeStateStr = _resolve_cubestate()
log_utils.log("\n\nInitial cube state: " + CubeStateStr)