From e6c15732cec1c246360d05f38c295b12439debb8 Mon Sep 17 00:00:00 2001 From: Maximilian Giller Date: Thu, 15 Feb 2024 21:45:28 +0100 Subject: [PATCH] Fixed import error --- src/statistics/debug_logging.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/statistics/debug_logging.py b/src/statistics/debug_logging.py index b806105..91ebd2f 100644 --- a/src/statistics/debug_logging.py +++ b/src/statistics/debug_logging.py @@ -1,23 +1,22 @@ -from ..sensors.tof_sensor import Directions -from ..sensors.people_counter import PeopleCounter +from sensors import Directions, PeopleCounter import logging import json -def debug_log_change(countChange: int, directionState: dict) -> None: +def _debug_log_change(countChange: int, directionState: dict) -> None: json_state = json.dumps(directionState) logging.debug(f"CHANGE;Count Change;{str(countChange)};Direction State;{json_state};") -def debug_log_trigger(triggerState: dict) -> None: +def _debug_log_trigger(triggerState: dict) -> None: logging.debug(f"TRIGGER;Inside Triggered;{str(triggerState[Directions.INSIDE])};Outside Triggered;{str(triggerState[Directions.OUTSIDE])};") -def debug_log_counting(countChange: int) -> None: +def _debug_log_counting(countChange: int) -> None: logging.debug(f"COUNTING;Count Change;{str(countChange)};") -def debug_log_measurement(direction: Directions, distance: float) -> None: +def _debug_log_measurement(direction: Directions, distance: float) -> None: logging.debug(f"MEASUREMENT;Direction;{str(direction)};Distance;{str(distance)};") def register_debug_logger(counter: PeopleCounter) -> None: - counter.hookChange(debug_log_change) - counter.hookCounting(debug_log_counting) - counter.hookTrigger(debug_log_trigger) - counter.hookMeasurement(debug_log_measurement) \ No newline at end of file + counter.hookChange(_debug_log_change) + counter.hookCounting(_debug_log_counting) + counter.hookTrigger(_debug_log_trigger) + counter.hookMeasurement(_debug_log_measurement) \ No newline at end of file