Skip to content

Commit

Permalink
voctogui.lib.toolbar.preview: a bit more debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi committed Nov 23, 2024
1 parent dfba718 commit be79c16
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions voctogui/lib/toolbar/preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def test(self):
Connection.send('best', str(self.command()))

def set_command(self, command, do_test=True):
self.log.debug(f">set_command {command=} {do_test=}")
self.do_test = False
self.log.info("Changing new composite to '%s'", str(self.command()))
if type(command) == str:
Expand All @@ -162,17 +163,22 @@ def set_command(self, command, do_test=True):
self.do_test = do_test
self.test()
self.do_test = True
self.log.debug(f"<set_command {command=} {do_test=}")

def on_best(self, best, targetA, targetB):
self.log.debug(f">on_best {best=} {targetA=} {targetB=}")
c = self.command()
c.A = targetA
c.B = targetB
self.set_command(c, False)
self.update_glow()
self.log.debug(f"<on_best {best=} {targetA=} {targetB=}")

def on_composite(self, command):
self.log.debug(f">on_composite {command=}")
self.output = CompositeCommand.from_str(command)
self.test()
self.log.debug(f"<on_composite {command=}")

def update_glow(self):
output = copy.copy(self.output)
Expand Down

0 comments on commit be79c16

Please sign in to comment.