Code Monkey home page Code Monkey logo

bflogoreplacer-app's Introduction

Betaflight Boot Logo Replacer

This web app can create font files for the MAX7456 OSD chip with a customized boot logo image, which can be then uploaded to a compatible flight controller using the Betaflight Configurator. Requires Python 3.

Installing

Install requirements

Like always, just use pip to install dependencies on your system:

sudo pip3 install -r requirements.txt

Or even better, you may consider using a virtual environment.

Download OSD fonts

Fonts from the Betaflight project are not part of this repo, but are required by this app. Run update-fonts.sh to download them from Betaflight Configurator's repo.

  • This fork was modified to unzip both version 1 and version 2 fonts. The app.py is hard-coded to point to version 2 fonts.

Enable reCAPTCHA

This web app supports reCAPTCHA to repell robots and keep them from spamming. Once you have created an account at the official reCAPTCHA home page and registered your site, you can provide the site key and secret key to the app to enable the reCAPTCHA widget. Copy recaptcha.cfg.sample as recaptcha.cfg and edit the copied file to include the keys for your site.

Set up SSL

SSL is enabled by default, the required certificate (app.crt) and key (app.key) files can be created by running create-cert.sh. The --no-ssl command line option can be used to disable this.

Source image restrictions

The input image for the custom logo must satisfy these requirements:

  • image has to be exactly 288px×72px
  • the best to use PNG or BMP format
  • background must be full green (#00ff00)
  • must use white (#fff) and black (#000) colors only
  • it's better to use RGB mode than RGBA (alpha is ignored anyway)
  • green areas will be transparent on the OSD

Command-line usage

usage: app.py [-h] [--no-ssl] [--no-recaptcha] [-p PORT] [-s ADDR] [-v] [-d]

optional arguments:
  -h, --help            show this help message and exit
  --no-ssl              disable SSL support (default: False)
  --no-recaptcha        disable reCAPTCHA (default: False)
  -p PORT, --port PORT  server port (default: 8720)
  -s ADDR, --host ADDR  host address (default: 0.0.0.0)
  -v                    verbosity level, can be used multiple times (default:
                        0)
  -d, --debug           enable debug mode and autoreload (default: False)

example: ./app.py --no-ssl --no-recaptcha -p 8080

Then open your web-browser to http://127.0.0.1:8080

bflogoreplacer-app's People

Contributors

atomgomba avatar meoso avatar nerdcopter avatar

Watchers

 avatar

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.