Skip to content

Commit

Permalink
Enable chord-logging without CC device
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymo111 committed Jul 19, 2024
1 parent a723a62 commit 8780e6b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions nexus/Freqlog/Freqlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ def _log_chord(self, chord: str, start_time: datetime, end_time: datetime) -> No
:param end_time: Timestamp of end of chord
:returns: True if chord was logged, False if it was banned
"""
if not self.chords:
logging.warning("Chords not loaded, not logging chord")
elif chord not in self.chords: # TODO: handle chord modifications (i.e. tense, plural, case)
if self.chords and chord not in self.chords: # TODO: handle chord modifications (i.e. tense, plural, case)
logging.warning(f"Chord '{chord}' not found in device chords, timing: {start_time} - {end_time}")
elif self.backend.log_chord(chord, end_time):
if self.backend.log_chord(chord, end_time):
logging.info(f"Chord: {chord} - {end_time}")
else:
logging.info(f"Banned chord, {end_time}")
Expand Down

0 comments on commit 8780e6b

Please sign in to comment.