Skip to content

Commit

Permalink
FIX-UP: was calling setmove led twice and delay adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
nicvagn committed Aug 8, 2024
1 parent 8c83706 commit ce1ce52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions nicsoft/lichess/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def run(self) -> None:
nl_inst.signal_lights(3)
for x in range(0, 2):
nl_inst.beep()
sleep(0.2)
sleep(0.01)
nl_inst.signal_lights(2)
sleep(1)
else: # If it is not one of these options, kill the stream
Expand Down Expand Up @@ -585,12 +585,10 @@ def handle_chat_line(self, chat_line: str) -> None:
@side_effect: changes lights and beep's chess board
"""
global nl_inst
nl_inst.signal_lights(sig_num=1)
print(chat_line)
# signal_lights set's lights on the chess board
nl_inst.signal_lights(1)
nl_inst.signal_lights(5)
nl_inst.beep()
sleep(0.6)
nl_inst.beep()


Expand Down
5 changes: 2 additions & 3 deletions nicsoft/niclink/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def signal_lights(self, sig_num: int) -> None:
self.set_all_LEDs(sig)

if self.last_move is not None:
time.sleep(0.3)
time.sleep(0.4)
self.set_move_LEDs(self.last_move)

def get_FEN(self) -> str:
Expand Down Expand Up @@ -603,9 +603,8 @@ def make_move_game_board(self, move: str) -> None:
This is not done automatically so external program's can have more control.
@param: move - move in uci str
"""
self.logger.debug("move made on gameboard. move %s", move)
self.logger.info("move made on gameboard. move %s", move)
self.game_board.push_uci(move)
self.set_move_LEDs(move)
self.logger.debug(
"made move on internal nl game board, BOARD POST MOVE:\n%s",
self.game_board,
Expand Down

0 comments on commit ce1ce52

Please sign in to comment.