chore(headers): fixing headers

This commit is contained in:
CarolinePascal
2025-12-24 08:59:21 +01:00
parent cc72c813bf
commit 32fc4015ee
3 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2024 The HuggingFace Inc. team. All rights reserved. # Copyright 2025 The HuggingFace Inc. team. All rights reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
# Copyright 2024 The HuggingFace Inc. team. All rights reserved. # Copyright 2025 The HuggingFace Inc. team. All rights reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
# Copyright 2024 The HuggingFace Inc. team. All rights reserved. # Copyright 2025 The HuggingFace Inc. team. All rights reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -32,14 +32,13 @@ import numpy as np
from serial import Serial from serial import Serial
from soundfile import SoundFile from soundfile import SoundFile
from lerobot.errors import ( from lerobot.utils.errors import (
DeviceAlreadyConnectedError, DeviceAlreadyConnectedError,
DeviceAlreadyRecordingError, DeviceAlreadyRecordingError,
DeviceNotConnectedError, DeviceNotConnectedError,
DeviceNotRecordingError, DeviceNotRecordingError,
) )
from lerobot.utils.shared_array import SharedArray from lerobot.utils.shared_array import SharedArray
from lerobot.utils.utils import capture_timestamp_utc
from ..microphone import Microphone from ..microphone import Microphone
from .configuration_touchlab import TouchLabSensorConfig from .configuration_touchlab import TouchLabSensorConfig
@@ -246,7 +245,7 @@ class TouchLabSensor(Microphone):
continue continue
with Serial(sensor_port, baud_rate, timeout=0.5) as serial_connection: with Serial(sensor_port, baud_rate, timeout=0.5) as serial_connection:
serial_connection.read_all() serial_connection.flush()
record_is_started_event.set() record_is_started_event.set()
while not record_stop_event.is_set(): while not record_stop_event.is_set():
tactile_callback(serial_connection) tactile_callback(serial_connection)
@@ -384,7 +383,7 @@ class TouchLabSensor(Microphone):
self.logs["delta_timestamp_s"] = time.perf_counter() - start_time self.logs["delta_timestamp_s"] = time.perf_counter() - start_time
# log the utc time at which the audio chunk was received # log the utc time at which the audio chunk was received
self.logs["timestamp_utc"] = capture_timestamp_utc() self.logs["timestamp_utc"] = time.perf_counter()
return tactile_readings return tactile_readings