Skip to content

Commit

Permalink
gain focus on MPL canvas click
Browse files Browse the repository at this point in the history
  • Loading branch information
MAKOMO committed Feb 28, 2024
1 parent e25aed8 commit 7953752
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/artisanlib/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2943,7 +2943,7 @@ def disconnect_draggableannotations_motion_notifiers(self) -> None:
pass

def onclick(self, event:'MouseEvent') -> None:
self.aw.lcd1.setFocus() # we set the focus to the LCD1 on clicking the MPL canvas to (re-)gain focus while the event minieditor is open
self.aw.setFocus() # we set the focus to the ApplicationWindow on clicking the MPL canvas to (re-)gain focus while the event minieditor is open
try:
if self.ax is None:
return
Expand Down
3 changes: 2 additions & 1 deletion src/artisanlib/pid.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ def getDuty(self) -> Optional[float]:
if self.pidSemaphore.available() < 1:
self.pidSemaphore.release(1)

def derivativeFilter(self) -> LiveSosFilter:
@staticmethod
def derivativeFilter() -> LiveSosFilter:
return LiveSosFilter(
scipy.signal.iirfilter(1, # order
Wn=0.2, # 0 < Wn < fs/2 (fs=1 -> fs/2=0.5)
Expand Down

0 comments on commit 7953752

Please sign in to comment.