Coder Social home page Coder Social logo

stylesuxx / esc-configurator Goto Github PK

View Code? Open in Web Editor NEW
140.0 8.0 42.0 4.91 MB

A Web-App to flash your BLHeli_S and AM32 based ESCs from the browser using the Web-Serial API.

Home Page: https://esc-configurator.com

License: GNU Affero General Public License v3.0

HTML 0.43% JavaScript 93.65% SCSS 5.51% Dockerfile 0.19% Shell 0.21%
blheli esc bluejay pwa am32 blheli-s quadcopter multirotor

esc-configurator's Introduction

ESC Configurator

Build Status Codacy Badge codecov Crowdin Netlify Status Discord

ESC Configurator - PWA (Progressive Web App)

A progressive web-app to flash your BLHeli_S capable ESCs directly from the web using the Web Serial API or the Web USB API as a fallback for Chrome on Android. The Web USB solution will work on a majority of android devices, but not all. Unfortunately it is not possible to detect if it will work, you will simply have to try. Also see this SO thread and this Chromium issue.

The latest state of the master branch can be viewed in the browser

This project is basically a re-write and clean up of the original BLHeli Configurator. Some bits and pieces have been re-used - mainly the ones concerning the actual flashing part.

I did this since I was interested in having this as an web app, but also because the original BLHeli configurator code was too much for me to re-factor and I thought I might be able to re-write it in the same amount of time.

I also tried to go with one front-end framework - React. Instead of having a mixture of lots of different stuff.

I re-used most of the look and feel of the original configurator, but since this is used on the web, adaptations to style are very much welcome. In the long run I can see this also be used on mobile phones via OTG port - once the Web Serial API makes it to there.

Supported Platforms & Firmware

Currently the SiLab EMF8 MCU's are supported with the following firmware:

SiLab EFM8:

ARM:

Adding new firmware

If you are a firmware developer please feel free to drop an issue so I can add your firmware. Look at how BLHeli and Bluejay are implemented.

If your firmware is based on BLHeli, make sure that you set a NAME in your layout - this allows me to easily identify which firmware is flashed and act accordingly.

Adding new platforms

Right now only SiLabs EFM8 MCU's are supported. But a lot of ARM and Atmel related code is ported, just the flashing is not implemented. If you want to see those features added and are willing to help, please tell me so in the issue section.

Translations

Translations are managed via crowdin so head on over there and contribute to the translations. Should your language not be enabled yet, let me know in the issues and I will add it.

Contributing

Contributions are very welcome. Feel free to submit PR's and discuss feature requests - I am open for all suggestions. If you submit a PR please also provide tests where it makes sense. Some tests can not (yet) be easily automated, like playing music or the actual flashing process without having to heavily mock those components.

If you do submit a PR, please do so against the develop branch. Also make sure that your code matches the linting rules. If you get warnings, try to adapt your code accordingly. If the rule makes no sense or can't really be satisfied it's OK to submit your PR anyway.

Dev Setup

Simply clone the repository, install dependencies and run the dev server. Pull requests are more than welcome.

Search the codes for TODO or IMPROVEMENTS, there is a lot that still can be done.

Install dependencies

yarn

Start dev server

yarn start

Build

yarn build

The build is then available from the build directory and can be served by simply hosting the content of the directory or via serve:

serve -s build -l 1234

Linting and testing

yarn lint
yarn test
yarn test:watch
yarn test:coverage

Docker setup

A Dockerfile is supplied that will build esc-configurator into a container image. A companion script called 'run.sh' is also supplied, which will trigger a build, start a container with the image and open the app in a google chrome.

History & Credits

This configurator is based on BLHeli Configurator which was based on Cleanflight Configurator which itself was based on Baseflight Configurator. I would like to thank everyone who contributed to one of those projects, without you this project would not be possible.

Authors & Contributors

To continue the legacy of everyone who was mentioned as author or contributor in one of the previously mentioned projects:

Authors & Contributors for esc-configurator

  • Mathias Rasmussen aka. mathiasvr - primary motivator and contributor for esc-configurator
  • Chris Landa aka. stylesuxx - primary author and maintainer of esc-configurator
  • Georg Oberleitner aka. Noctaro - Logo
Translations

Thank you to everyone who contributed their time and added translations via crowdin:

  • Hugo Chiang aka. DusKing1 - Chinese translation
  • Asier Ruiz aka. Asizon - Spanish translation
  • djtms - Polish translation
  • Mat Cron - Italian translation
  • psicho100pro - Czech translation
  • Noctaro - German translation
Startup Melodies

A big shout out goes to all the talented people submitting startup melodies:

  • Airwolf359
  • arwebSE
  • cypher1591
  • GKLove
  • kilozebra
  • Lordnibbler
  • Noctaro
  • Ryano12
  • Shadow0624
  • Thorondor

If you feel that your name should be mentioned in the authors section, please do not hesitate to submit a pull request.

esc-configurator's People

Contributors

alkamotors avatar cypher1591 avatar dusking1 avatar freasy avatar ggoraa avatar kentonbandy avatar kikoqiu avatar leoosk avatar mathiasvr avatar saidinesh5 avatar stylesuxx avatar t413 avatar timmalahov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esc-configurator's Issues

Tracking

Tracking is not implemented at all for the moment. To do so, we would need to ask the users for consent.

I am not yet sure what the best course of action for this is right now.

FW file caching

The og configurator has some mechanic for caching firmware files - something similar could be done here too using the local storage - but does this make sense?

Flashing of ATMEL

Right now only flashing SiLab MCU's is possible, a lot code to support ATMEL and ARM is already present - the actual flashing part needs to be implemented and tested.

Setting tool-tips

It should be possible to show detailed information about each setting when the user hovers over an icon.

  • Implement functionality to display tool-tips
  • Add the actual tool-tips to the translation file

Allow spinning of motors

It should be possible to allow spinning of motors via MSP as suggested by @AlkaMotors

  • spin all motors
  • spin individual motors
  • spin multiple, individual motors

Set ESC hint on AM32

ESC hint should also be pre-set on AM32 so that the proper ESC is already pre-selected.

InputRange component

The currently used Input range component for the sliders is pretty much unmaintained and a delay is needed for it to work properly - would be good to refactor this to a different library.

Save Log

The "Save Log" button does nothing for now - I honestly also do not think, that the log from the bar is really worth exporting - maybe this could be used to export debug logs from the console instead.

AM32 Support

BLHELI_32 ESC's can be flashed with AM32. It only requires initial bootloader flashing from the test-point on the ESC, from there, everything can be flashed via 4 way interface.

The initial BL flashing needs to be done manually, the configurator will not support that, but from there on, we can manage AM32 like the SiLabs chips.

Custom Logo

@Noctaro is designing a Logo, since the Bluejay Logo does not really represent the project as a whole.

State machine

Wrap the serial functionality into a state machine to remove some "responsibility" from the UI.

This will prevent restoring defaults during flashing for example.

Problems with 1 ESC

It seems there are some problems when only 1 ESC is attached - the configurator still is looking for the other three.

Default Settings

Add functionality to reset everything back to default settings.

Firmware selection

A solution to the BLHELI_S vs. BLHELI_M problem might be, to allow the user to select which firmware is actually running.

Merging settings

Settings need to be merged after flashing - so that the direction of the motors is left as it initially was.

Multiple Ports

Technically the Web Serial API remembers which serial devices access was given to. If multiple of those devices are currently connected, a drop-down displaying all of the available devices could be displayed.

Translation

Can you port the translation to crowdin platform? I can do Simplified Chinese and Traditional Chinese.

Blheli M Support

Config files are prepared - but it seems the BLHELI M confiugrator does something else too - the PWM settings are not showing up for some reason.

https://github.com/Asizon/blheli-configurator/tree/1.2.0-jazzmaverick-beta4

This one might be tricky, since BLHELI_M is not setting a custom name and to detect the settings it is important that we can identify what we are dealing with.

For this to work, BLHELI_M needs to set the NAME field of the EEPROM layout, only then this feature can be realized.

  • If BLHeli_S v16.9 is detected, display a warning similar to JESC for people to use the dedicated BLHeli_M configurator

Allow Firmware selection

Right now it is only possible to flash Bluejay, but technically this could be a selection in the firmware selection screen and would allow for different firmwares to be flashed.

In the firmware selection Tab a new Dropdown should be added which allows to select which Firmware should be flashed.

Options:

  • BLHELI_s
  • Bluejay

Once this is implemented, any other variant can easily be added if it follows the structure of the configuration files.

Motor Speed via DSHOT

@mathiasvr requested motor speed to be adjusted via DSHOT instead of MSP to benefit from the full resolution.

This could be made optional - per default the speed is done via MSP, and on user request (checkbox) the Speed can be set via DSHOT command.

We could also use this in combination with EDT. Some kind of monitor for DSHOT commands.

Translations

A lot of things are not yet translated. I tried to use the translator function for all static strings, but there are still missing from the translation file.

Everything that is camel cases is basically not yet translated, the majority of which are settings related to og BLHELI_S.

visibleIf not working

Settings with the visibleIf condition need to be updated after a change has been made in the settings.

Configuration files part of firmware repo

If the configuration files (escs.json versions.json) were part of the firmware file, we could get them from there and the configurator would basically not needed to be updated at all.

Only the EEPROM layouts would need to be migrated to their own JSON file too.

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.