Skip to content

Commit

Permalink
add a 5s timeout to commands #421
Browse files Browse the repository at this point in the history
  • Loading branch information
3ll3d00d committed Jan 14, 2021
1 parent 5b568e7 commit 00ead63
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/python/model/minidsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,17 +536,17 @@ def __send_config(self):
# minidsp config <slot>
cmd = self.__runner['config', str(self.__slot)]
logger.info(f"Executing {cmd}")
cmd.run()
cmd.run(timeout=5)

def __send_biquad(self, channel: str, idx: str, coeffs: List[str]):
# minidsp input <channel> peq <index> set -- <b0> <b1> <b2> <a1> <a2>
cmd = self.__runner['input', channel, 'peq', idx, 'set', '--', coeffs]
logger.info(f"Executing {cmd}")
cmd.run()
cmd.run(timeout=5)
self.__send_bypass(channel, idx, False)

def __send_bypass(self, channel: str, idx: str, bypass: bool):
# minidsp input <channel> bypass on
cmd = self.__runner['input', channel, 'peq', idx, 'bypass', 'on' if bypass else 'off']
logger.info(f"Executing {cmd}")
cmd.run(retcode=None)
cmd.run(timeout=5)

0 comments on commit 00ead63

Please sign in to comment.