Skip to content

Commit 5c36340

Browse files
committed
Can skip to next on bluetooth when scrambling
1 parent 178029d commit 5c36340

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

term_timer/interface/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,14 @@ async def scramble_solve(self):
8080
char = await self.getch('scrambled')
8181

8282
if char in {'q', ESCAPE_CHAR}:
83+
return False
84+
85+
if char and self.bluetooth_interface:
8386
return True
8487

8588
self.set_state('scrambled')
8689

87-
return False
90+
return None
8891

8992
async def inspect_solve(self):
9093
inspection_task = asyncio.create_task(self.inspection())

term_timer/timer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ async def start(self) -> bool:
242242

243243
quit_solve = await self.scramble_solve()
244244

245-
if quit_solve:
246-
return False
245+
if quit_solve is not None:
246+
return quit_solve
247247

248248
if self.countdown:
249249
await self.inspect_solve()

term_timer/trainer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ async def start(self) -> bool:
143143

144144
quit_solve = await self.scramble_solve()
145145

146-
if quit_solve:
147-
return False
146+
if quit_solve is not None:
147+
return quit_solve
148148

149149
await self.wait_solve()
150150
await self.time_solve()

0 commit comments

Comments
 (0)