purduesigbots / pros

Source code for PROS kernel: open source C/C++ development for the VEX V5 microcontroller
https://pros.cs.purdue.edu
Other
259 stars 76 forks source link

PROS 4.0.4: Add Converting Constructors for Each Device Class #569

Closed WillXuCodes closed 9 months ago

WillXuCodes commented 1 year ago

Expected Behavior:

Issue right now is that you can't cast a motor to a device class, so dynamic instantiation is not possible.

Actual Behavior:

We need a way for users to create motors based on detection, so we should add a constructor to create a motor, imu, and other "vdml" device that takes in a device reference for each device.