From db8235732b5ab3ff1fb805f741fd458c76ff97f0 Mon Sep 17 00:00:00 2001 From: David Vo Date: Sun, 24 Nov 2024 14:44:15 +1100 Subject: [PATCH] magicbot: Add usage reporting --- magicbot/magicrobot.py | 6 +++++- setup.cfg | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/magicbot/magicrobot.py b/magicbot/magicrobot.py index 8842c1b..85d1dd7 100644 --- a/magicbot/magicrobot.py +++ b/magicbot/magicrobot.py @@ -67,10 +67,14 @@ class MagicRobot(wpilib.RobotBase): def __init__(self) -> None: super().__init__() + hal.report( + hal.tResourceType.kResourceType_Framework.value, + hal.tInstances.kFramework_MagicBot.value, + ) self._exclude_from_injection = ["logger"] - self.__last_error_report = -10 + self.__last_error_report = -10.0 self._components: list[tuple[str, Any]] = [] self._feedbacks: list[tuple[Callable[[], Any], Callable[[Any], Any]]] = [] diff --git a/setup.cfg b/setup.cfg index e7eca21..f2b88dc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,7 @@ zip_safe = False include_package_data = True packages = find: install_requires = - wpilib>=2025.0.0b1,<2026 + wpilib>=2025.0.0b2,<2026 setup_requires = setuptools_scm > 6 python_requires = >=3.9