Skip to content

Commit

Permalink
voctogui.lib.presetcontroller: fix detection which composition is act…
Browse files Browse the repository at this point in the history
…ually live
  • Loading branch information
Kunsi committed Nov 23, 2024
1 parent 3b97535 commit 0c7fd8d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions voctogui/lib/presetcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,21 @@ def on_btn_toggled(self, btn):
self.log.debug(f"<on_btn_toggle {btn=} {id=}")

def _compare_command(self, commandA, commandB):
return (
is_equal = (
commandA.A == commandB.A
and (
commandB.composite == 'fs'
(
commandA.composite == 'fs'
and commandB.composite == 'fs'
)
or (
commandA.composite == commandB.composite
and commandA.B == commandB.B
)
)
)
self.log.debug(f"{commandA} {'==' if is_equal else '!='} {commandB}")
return is_equal

def on_best(self, best, targetA, targetB):
self.log.debug(f">on_best {best=} {targetA=} {targetB=} {self.current_state=}")
Expand Down

0 comments on commit 0c7fd8d

Please sign in to comment.