mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-23 01:21:40 +00:00
add missing log and use logger over print (#1596)
This is closer to a port of the Java/C++ stuff and will mean we get a more standard print output with the rest of the logging in the lib
This commit is contained in:
@@ -9,6 +9,8 @@ from wpimath.units import hertz, seconds
|
||||
|
||||
from ..estimation import RotTrlTransform3d
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SimCameraProperties:
|
||||
"""Calibration and performance values for this camera.
|
||||
@@ -46,7 +48,7 @@ class SimCameraProperties:
|
||||
) -> None:
|
||||
if fovDiag.degrees() < 1.0 or fovDiag.degrees() > 179.0:
|
||||
fovDiag = Rotation2d.fromDegrees(max(min(fovDiag.degrees(), 179.0), 1.0))
|
||||
logging.error("Requested invalid FOV! Clamping between (1, 179) degrees...")
|
||||
logger.error("Requested invalid FOV! Clamping between (1, 179) degrees...")
|
||||
|
||||
resDiag = math.sqrt(width * width + height * height)
|
||||
diagRatio = math.tan(fovDiag.radians() / 2.0)
|
||||
|
||||
Reference in New Issue
Block a user