Giter Site home page Giter Site logo

Multiple HALs about jled HOT 7 CLOSED

troky avatar troky commented on June 20, 2024
Multiple HALs

from jled.

Comments (7)

jandelgado avatar jandelgado commented on June 20, 2024

I'll provide an example showing how to drive built-in ESP32 PWM's and an PCA9685 driver in the next days.

from jled.

troky avatar troky commented on June 20, 2024

Driving PCA9685 (creating new HAL) is not a problem. I want to have std::list of different HAL types.

from jled.

jandelgado avatar jandelgado commented on June 20, 2024

Could you please provide an example what the exact problem is (code)?

from jled.

troky avatar troky commented on June 20, 2024

There is no (abstract) base class/interface that coul be used.
For example: I need std:: list<JLedBase*>() where list elemnts can be JLed, JLed, etc... so I can cast JLed to JLedBase and call JLedBase->On() function etc...

from jled.

jandelgado avatar jandelgado commented on June 20, 2024

There is intentionally no base class to keep the memory footprint low. But coincidentially I am working on a feature allowing to stuff different objects like JLed objects or JLedSequence objects recursively into a JLedSequence. I'll try to provide a branch that you can test in the next days.

from jled.

troky avatar troky commented on June 20, 2024

Well, for test, I de-templated your TLed class and made it abstract adding two virtual functions: analogWrite() and millis() and now I can create derived class from public TLed and implement those two funcions just like you do it in separate hal class. Problem solved... now I can have std::list<TLed *>()

from jled.

github-actions avatar github-actions commented on June 20, 2024

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days

from jled.

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.