Giter Club home page Giter Club logo

Comments (6)

makermelissa avatar makermelissa commented on September 25, 2024

All boards are uppercase. Currently pulseio is looking at these properties: https://github.com/adafruit/Adafruit_Python_PlatformDetect/blob/master/adafruit_platformdetect/board.py#L462-L622

from adafruit_python_platformdetect.

robomike avatar robomike commented on September 25, 2024

I added this code to pulseio.py on a development versions, all of the names are lower case in the file. however the only thing that worked for the jetson was this capital line:

elif detector.board.JETSON_NANO:

from adafruit_python_platformdetect.

robomike avatar robomike commented on September 25, 2024

Ping. Can you please explain why all the elif in the blinka pulseio.py is lower case if detector is supposed to be capitalized? I'd like to finish the pulseio implementation

from adafruit_python_platformdetect.

dhalbert avatar dhalbert commented on September 25, 2024

I added this code to pulseio.py on a development versions, all of the names are lower case in the file. however the only thing that worked for the jetson was this capital line:

elif detector.board.JETSON_NANO:

This will always be true, because it's a constant that is "truthy":

Can you please explain why all the elif in the blinka pulseio.py is lower case if detector is supposed to be capitalized

It is just a name for the string. In detector/constants/boards.py, there is this: JETSON_NANO = "JETSON_NANO". The if in blinka pulseio.py is actually checking whether a certain kind of board is present. For Jetson, you want to check:

elif detector.board.any_jetson_board:
...

That will return true if it's a Jetson board.

from adafruit_python_platformdetect.

makermelissa avatar makermelissa commented on September 25, 2024

@dhalbert explained this well. You may also consider using something like:

if detector.board.id == detector.board.JETSON_NANO:

from adafruit_python_platformdetect.

makermelissa avatar makermelissa commented on September 25, 2024

Closing because making this change would break a lot of other stuff.

from adafruit_python_platformdetect.

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.