Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
auscompgeek opened this issue Feb 8, 2024 · 2 comments
Closed

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

auscompgeek opened this issue Feb 8, 2024 · 2 comments

Comments

@auscompgeek
Copy link
Member

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
Copy link

REVLib v2024.2.1 should fix this issue

@virtuald
Copy link
Member

Fixed in #58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants