From f805379385b7b0e0a32d154726499a24ccd973c8 Mon Sep 17 00:00:00 2001 From: jpunkt Date: Fri, 5 Nov 2021 07:30:30 +0100 Subject: [PATCH] Cleaning up. --- pizzactrl/hal_serial.py | 4 ---- pizzactrl/statemachine.py | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pizzactrl/hal_serial.py b/pizzactrl/hal_serial.py index 9397c14..36c9402 100644 --- a/pizzactrl/hal_serial.py +++ b/pizzactrl/hal_serial.py @@ -212,10 +212,6 @@ def record_sound(hal: PizzaHAL, filename: Any, duration: int, sd.stop() else: sd.wait() # Wait until recording is finished - # TODO test - # myrecording = np.int16(myrecording) - # song = pydub.AudioSegment(myrecording.tobytes(), frame_rate=AUDIO_REC_SR, sample_width=2, channels=2) - # song.export(str(filename), format="mp3", bitrate="44.1k") writewav(str(filename), AUDIO_REC_SR, myrecording) if cache: hal.soundcache[str(filename)] = (myrecording, AUDIO_REC_SR) diff --git a/pizzactrl/statemachine.py b/pizzactrl/statemachine.py index d6b8047..b18f0c5 100644 --- a/pizzactrl/statemachine.py +++ b/pizzactrl/statemachine.py @@ -193,8 +193,8 @@ class Statemachine: Activity.TAKE_PHOTO: take_photo, Activity.LIGHT_LAYER: light_layer, Activity.LIGHT_BACK: backlight, - Activity.ADVANCE_UP: move_vert, - Activity.ADVANCE_LEFT: move_hor + # Activity.ADVANCE_UP: move_vert, + # Activity.ADVANCE_LEFT: move_hor }[act.activity](self.hal, **act.values) except KeyError: logger.exception('Caught KeyError, ignoring...')