Coder Social home page Coder Social logo

Comments (5)

PeterMitrano avatar PeterMitrano commented on June 14, 2024

sounds super helpful. Do teams struggle with this often? It seems like a stupid error that might be hard to find.

from allwpilib.

ThadHouse avatar ThadHouse commented on June 14, 2024

All of the other classes throw exceptions, so this is the odd class out. And also yes its pretty common especially early in the season. I'll wait until after my HAL proposal to do this, as this can be implemented either at the HAL level or the WPILib level.

from allwpilib.

xeniarose avatar xeniarose commented on June 14, 2024

From a design perspective I think it makes more sense to turn the CANTalon constructor private and create a "factory" static method that initializes singletons for each CAN ID you call it with. (and extend this to the other classes that need a similar pattern)

from allwpilib.

PeterJohnson avatar PeterJohnson commented on June 14, 2024

While singletons might have been a cleaner design at inception, making such a change now would break thousands of existing programs. Per https://github.com/wpilibsuite/allwpilib/blob/master/CONTRIBUTING.md#what-to-contribute, "backwards compatibility is very important for WPILib".

from allwpilib.

Kevin-OConnor avatar Kevin-OConnor commented on June 14, 2024

CANTalon moved to CTRE managed external library

from allwpilib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.