Changes from review

This commit is contained in:
jaknapper 2026-05-14 10:52:33 +01:00
parent 5be8b0ecab
commit cbfbd84fa9
7 changed files with 14 additions and 21 deletions

View file

@ -323,14 +323,14 @@ class BaseCamera(OFMThing):
os.makedirs(output_dir, exist_ok=True)
timestamp = time.strftime("%Y%m%d_%H%M%S")
log_path = os.path.join(
datafile_path = os.path.join(
output_dir,
f"framerate_{timestamp}.json",
)
self.logger.info(
"Framerate monitor started -> %s",
log_path,
datafile_path,
)
self._framerate_monitor_running = True
@ -363,15 +363,15 @@ class BaseCamera(OFMThing):
avg_fps,
)
with open(log_path, "w") as f:
with open(datafile_path, "w") as f:
json.dump(data, f, indent=2)
self.logger.info(
"Framerate monitor complete -> %s",
log_path,
datafile_path,
)
return log_path
return datafile_path
@lt.property
def stream_active(self) -> bool:

View file

@ -167,7 +167,6 @@ class StreamingPiCamera2(BaseCamera):
self._sensor_info = SUPPORTED_CAMS_SENSOR_INFO[camera_board]
self._picamera_lock = RLock()
self._picamera = None
self._framerate_monitor_running = False
# Load the tuning file for the specified sensor mode.
self.default_tuning = tf_utils.load_default_tuning(