Skip to content

[BUG]: Creating a brushed Spark Max aborts in sim #55

@auscompgeek

Description

@auscompgeek

Problem description

Constructing a CANSparkMax with MotorType.kBrushed in simulation causes the robot code to exit with SIGABRT.

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


[CAN SPARK] IDs: 2, Error Invalid Cannot set motor type to kBrushed for SPARK without a dock connected.

libc++abi: terminating
fish: Job 1, 'python' terminated by signal SIGABRT (Abort)

Operating System

MacOS

Installed Python Packages

Package                  Version                               Editable project location
------------------------ ------------------------------------- ------------------------------------------------------
bcrypt                   4.1.2
beartype                 0.16.4
black                    23.12.1
cffi                     1.16.0
click                    8.1.7
cryptography             41.0.7
cxxheaderparser          1.3.0
delocate                 0.10.7
iniconfig                2.0.0
Jinja2                   3.1.2
MarkupSafe               2.1.3
mypy-extensions          1.0.0
overtake                 0.4.0
packaging                23.2
paramiko                 3.4.0
patch                    1.16
pathspec                 0.12.1
pcpp                     1.30
Pint                     0.23
pip                      23.3.2
platformdirs             4.1.0
pluggy                   1.3.0
pybind11-stubgen         2.3.7
pycparser                2.21
pydantic                 1.10.13
pyfrc                    2024.0.1
PyNaCl                   1.5.0
pynetconsole             2.0.4
pyntcore                 2024.1.1.0
pytest                   7.4.2
pytest-reraise           2.1.2
PyYAML                   6.0.1
robotpy                  2024.1.1
robotpy-build            2024.0.0                              /Users/davidv/dev/frc/robotpy/robotpy-build
robotpy-cli              2024.0.0
robotpy-commands-v2      2024.0.0b4                            /Users/davidv/dev/frc/robotpy/robotpy-commands-v2
robotpy-hal              2024.1.1.0
robotpy-halsim-gui       2024.1.1.0
robotpy-installer        2024.0.2
robotpy-rev              2024.0.0b1.post2.dev1+gba85a5563af7   /Users/davidv/dev/frc/robotpy/robotpy-rev
robotpy-wpilib-utilities 2024.0.1.dev0+g58dc9c8ff091.d20240107 /Users/davidv/dev/frc/robotpy/robotpy-wpilib-utilities
robotpy-wpimath          2024.1.1.0
robotpy-wpinet           2024.1.1.0
robotpy-wpiutil          2024.1.1.0
setuptools               68.1.2
setuptools-scm           7.1.0
sphinxify                0.11                                  /Users/davidv/dev/frc/robotpy/sphinxify
tomli                    2.0.1
tomli_w                  1.0.0
toposort                 1.10
typing_extensions        4.9.0
wheel                    0.42.0
wpilib                   2024.1.1.0

Reproducible example code

import rev
sm = rev.CANSparkMax(2, rev.CANSparkLowLevel.MotorType.kBrushed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions