robotpy / robotpy-rev

RobotPy bindings for REV Robotics' REVLib
Other
8 stars 13 forks source link

[BUG]: Instantiating CANSparkMax raises a warning in sim #57

Closed auscompgeek closed 8 months ago

auscompgeek commented 8 months ago

Problem description

Warning at CANSparkMax: Warning: CANSparkMax object created for CAN ID 1, which is not a SPARK MAX. Some functionalities may not work.
  File "/home/davo/dev/frc/thedropbears/pycrescendo/.venv/lib64/python3.12/site-packages/wpilib/_impl/start.py", line 247, in _start
    self.robot.startCompetition()

  File "/home/davo/dev/frc/thedropbears/pycrescendo/.venv/lib/python3.12/site-packages/magicbot/magicrobot.py", line 361, in startCompetition
    self.robotInit()

  File "/home/davo/dev/frc/thedropbears/pycrescendo/.venv/lib/python3.12/site-packages/magicbot/magicrobot.py", line 110, in robotInit
    self._create_components()

  File "/home/davo/dev/frc/thedropbears/pycrescendo/.venv/lib/python3.12/site-packages/magicbot/magicrobot.py", line 616, in _create_components
    component = self._create_component(m, ctyp, injectables)

  File "/home/davo/dev/frc/thedropbears/pycrescendo/.venv/lib/python3.12/site-packages/magicbot/magicrobot.py", line 687, in _create_component
    component = ctyp(**injections)

  File "/home/davo/dev/frc/thedropbears/pycrescendo/components/shooter.py", line 61, in __init__
    self.injector = CANSparkMax(

[CAN SPARK] IDs: 1, 2, 3, Parameter type mismatch for parameter id Getting Product ID parameter failed. Unable to account for device-specific behavior differences.

Operating System

Windows, MacOS, Linux

Installed Python Packages

╭──────────────────────────┬────────────┬──────────╮
│ name                     │ version    │ location │
├──────────────────────────┼────────────┼──────────┤
│ attrs                    │ 23.2.0     │          │
│ bcrypt                   │ 4.1.2      │          │
│ cffi                     │ 1.16.0     │          │
│ coverage                 │ 7.4.0      │          │
│ cryptography             │ 41.0.7     │          │
│ hypothesis               │ 6.97.4     │          │
│ iniconfig                │ 2.0.0      │          │
│ mypy                     │ 1.8.0      │          │
│ mypy-extensions          │ 1.0.0      │          │
│ numpy                    │ 1.26.3     │          │
│ packaging                │ 23.2       │          │
│ paramiko                 │ 3.4.0      │          │
│ phoenix6                 │ 24.1.0     │          │
│ photonlibpy              │ 2024.2.2   │          │
│ Pint                     │ 0.23       │          │
│ pip                      │ 23.2.1     │          │
│ pluggy                   │ 1.3.0      │          │
│ py                       │ 1.11.0     │          │
│ pycparser                │ 2.21       │          │
│ pyfrc                    │ 2024.0.1   │          │
│ PyNaCl                   │ 1.5.0      │          │
│ pynetconsole             │ 2.0.4      │          │
│ pyntcore                 │ 2024.2.1.2 │          │
│ pytest                   │ 8.0.0      │          │
│ pytest-forked            │ 1.6.0      │          │
│ pytest-reraise           │ 2.1.2      │          │
│ robotpy                  │ 2024.2.1.1 │          │
│ robotpy-apriltag         │ 2024.2.1.2 │          │
│ robotpy-cli              │ 2024.0.0   │          │
│ robotpy-ctre             │ 2024.1.1   │          │
│ robotpy-hal              │ 2024.2.1.2 │          │
│ robotpy-halsim-gui       │ 2024.2.1.2 │          │
│ robotpy-installer        │ 2024.1.3   │          │
│ robotpy-navx             │ 2024.1.0   │          │
│ robotpy-rev              │ 2024.2.0   │          │
│ robotpy-wpilib-utilities │ 2024.0.0   │          │
│ robotpy-wpimath          │ 2024.2.1.2 │          │
│ robotpy-wpinet           │ 2024.2.1.2 │          │
│ robotpy-wpiutil          │ 2024.2.1.2 │          │
│ setuptools               │ 69.0.3     │          │
│ sortedcontainers         │ 2.4.0      │          │
│ tomli                    │ 2.0.1      │          │
│ typing_extensions        │ 4.9.0      │          │
│ wpilib                   │ 2024.2.1.2 │          │
╰──────────────────────────┴────────────┴──────────╯

Reproducible example code

motor = rev.CANSparkMax(1, rev.CANSparkMax.MotorType.kBrushless)
jfabellera commented 8 months ago

REVLib v2024.2.1 should fix this issue

virtuald commented 8 months ago

Fixed in #58