CrossTheRoadElec / Phoenix-api

CTRE Phoenix language API (targets FIRST Robotics Competition, Linux, RaspPi, Windows)
Other
39 stars 28 forks source link

BaseMotorController::setDeviceID #64

Closed lit-af closed 3 years ago

lit-af commented 5 years ago

Feature Requests

Feature request in as much detail as possible.

Could a setDeviceID method be added to Phoenix-api/cpp/src/MotorControl/CAN/BaseMotorController.cpp ?

Why it is beneficial.

Our robot has got four drives, in the event that one fails, we'd be able to replace one without previously configuring its ID using LifeBoat. We'd run a script that pools the ID on the network, then we'd set the ID that doesn't match the one expected.

A series of steps to test the feature after it is implemented

From C++ be able to set a drive ID. Then getDeviceID() should return the ID that was set.

JCaporuscio commented 3 years ago

This is not a feature we're interested in adding.

The device ID is conceptually fundamental to the object. If you need to change the ID of a motor controller object you're using, you should instantiate a new object.