Git Product home page Git Product logo

Comments (3)

stylesuxx avatar stylesuxx commented on August 16, 2024

Turns out this is a bit more tricky: Settings sometime require a function to determine if they are visible or not. This can not easily be abstracted into JSON. Obviously we don't want to blindly pull in stuff and execute functions since this could open doors for exploits.

from esc-configurator.

stylesuxx avatar stylesuxx commented on August 16, 2024

The visibility conditions are actually pretty trivial since they only reference fields in settings:

visibleIf: (settings) => settings.VARIABLE_PWM_FREQUENCY === 0,

could be abstracted in JSON of this form:

{
  field: 'VARIABLE_PWM_FREQUENCY',
  operator: 'equal',
  value: 0
}

depending on operator the value should hold different fields - the following options would cover all currently used visibleIf statements in AM32, BlHeli_S and Bluejay:

  • equal: single value
  • notEqual: single value
  • oneOf: array of values

Obviously we would lose flexibility this way, but reduce maintanance of the Sources to basically zero, since they can be maintained in the repository itself.

Still leaves place for firmware maintainers to do something not intended and break functionality.

from esc-configurator.

stylesuxx avatar stylesuxx commented on August 16, 2024

There is a PR in preparation that aims at fetching the versions directly from the firmware repositories #147
ESC layouts were already moved to the repository itself, they are no longer fetched from 3rd party repositories.

This issue is thus pretty much obsolete.

from esc-configurator.

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.