From 7087257426ae8b499cbe0d1cf91b857f2ebc8147 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Sun, 3 Mar 2024 07:45:24 -0500 Subject: [PATCH] manual control debug --- axis-ptz-controller.env | 1 + axis-ptz-controller/axis_ptz_controller.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/axis-ptz-controller.env b/axis-ptz-controller.env index 64ca4c6..76f5255 100644 --- a/axis-ptz-controller.env +++ b/axis-ptz-controller.env @@ -11,6 +11,7 @@ ORIENTATION_TOPIC=/${PROJECT_NAME}/${HOSTNAME}/Orientation/edgetech-auto-oriente OBJECT_TOPIC=/${PROJECT_NAME}/${HOSTNAME}/Object/edgetech-c2/JSON IMAGE_FILENAME_TOPIC=/${PROJECT_NAME}/${HOSTNAME}/Image_Filename/edgetech-axis-ptz-controller/JSON IMAGE_CAPTURE_TOPIC=/${PROJECT_NAME}/${HOSTNAME}/Image_Capture/edgetech-axis-ptz-controller/JSON +MANUAL_CONTROL_TOPIC=/${PROJECT_NAME}/${HOSTNAME}/Manual_Control/edgetech-axis-ptz-controller/JSON LOGGER_TOPIC=/${PROJECT_NAME}/${HOSTNAME}/Logger/edgetech-axis-ptz-controller/JSON TRIPOD_LATITUDE= diff --git a/axis-ptz-controller/axis_ptz_controller.py b/axis-ptz-controller/axis_ptz_controller.py index 5b95774..7a4af84 100644 --- a/axis-ptz-controller/axis_ptz_controller.py +++ b/axis-ptz-controller/axis_ptz_controller.py @@ -980,7 +980,7 @@ def _manual_control_callback(self, _client: Union[mqtt.Client, None], logging.info(f"Setting zoom to: {self.zoom}") # Get camera pan and tilt self.rho_c, self.tau_c, _zoom, _focus = self.camera_control.get_ptz() - logging.debug(f"Camera pan and tilt: {self.rho_c}, {self.tau_c} [deg]") + logging.info(f"Camera pan and tilt: {self.rho_c}, {self.tau_c} [deg]") logging.info( f"Absolute move to pan: {self.rho_o}, and tilt: {self.tau_o}, with zoom: {self.zoom}" ) @@ -990,6 +990,7 @@ def _manual_control_callback(self, _client: Union[mqtt.Client, None], ) except Exception as e: logging.error(f"Error: {e}") + logging.info(f"rho_c: {self.rho_c}, rho_o: {pan}, tau_c: {self.tau_c}, tau_o: {tilt}, pan_rate_max: {self.pan_rate_max}, tilt_rate_max: {self.tilt_rate_max}") duration = max( math.fabs(self._compute_angle_delta(self.rho_c, pan)) / (self.pan_rate_max / 2),