Skip to content

Error Message for having more than one CANSparkMax use the same port for Simulation #66

@ProfessorAtomicManiac

Description

@ProfessorAtomicManiac

People were running "Simulate Robot Code" and they had more than one CANSparkMax use the same port. They got this error:

Error at org.carlmontrobotics.lib199.sim.MockSparkMax.<init>(MockSparkMax.java:38): Unhandled exception: java.lang.NullPointerException: Cannot invoke "edu.wpi.first.hal.SimDevice.createDouble(String, edu.wpi.first.hal.SimDevice$Direction, double)" because "this.motor" is null
        at org.carlmontrobotics.lib199.sim.MockSparkMax.<init>(MockSparkMax.java:38)

It would be nice if instead the error message said "More than one CANSparkMax has that port id" or something like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions