Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/edgetx/buddy
The next generation tool for EdgeTX. A cross platform app, with browser compatibility.
https://github.com/edgetx/buddy
dfu edgetx electron firmware flashing tool web-filesystem webusb
Last synced: about 1 month ago
JSON representation
The next generation tool for EdgeTX. A cross platform app, with browser compatibility.
- Host: GitHub
- URL: https://github.com/edgetx/buddy
- Owner: EdgeTX
- License: mit
- Created: 2021-12-15T20:57:09.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-25T03:57:44.000Z (8 months ago)
- Last Synced: 2024-05-23T01:20:27.818Z (7 months ago)
- Topics: dfu, edgetx, electron, firmware, flashing, tool, web-filesystem, webusb
- Language: TypeScript
- Homepage: https://buddy.edgetx.org
- Size: 73.9 MB
- Stars: 35
- Watchers: 5
- Forks: 17
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
> Helping you on your journey to EdgeTX
- [Use it online](https://buddy.edgetx.org/)
- [Download the App](https://github.com/EdgeTX/buddy/releases/tag/latest)## Development
### Prerequisites
This application uses `node-usb` when running in electron. In order to compile the bindings
some build libraries are required depending on platform. For MacOS and Windows, these should
already be built in.Linux
```bash
$ sudo apt-get install build-essential libudev-dev
```This software is designed to run on `node@20` which can be installed with [`Fast Node Manager`](https://github.com/Schniz/fnm)
### Commands
Enable or install yarn package manager
```bash
# For Node.js <16.10
$ npm i -g corepack# For Node.js >=16.10
$ corepack enable
```Install deps
```bash
$ yarn
```Developing
```bash
# Start electron and web environments in watch mode
$ yarn start# Start web environment only
$ yarn start:web# Storybook component environment
$ yarn storybook
```Building
```bash
# Build and pack electron app (outputs renderer assets too)
$ yarn build# Compile only web environment
$ yarn compile:web:production
```Run tests
```bash
$ yarn test
```Run e2e tests - requires web or app to be built
```bash
# Web app tests
$ yarn e2e:web
# Electron app tests
$ yarn e2e:app
```Lint
```bash
$ yarn lint:all# Or yarn lint
```Format (this codebase has enforced formatting with prettier)
```bash
$ yarn fmt
```Extract new translation strings
```bash
$ yarn extract-locales
```### Translations
Translation strings are stored in the [`./locales`](./locales/) directory.
To contribute a language which doesn't already exist:1. Add the ISO code to the [`./locales/languages.json`](./locales/languages.json)
1. Extract the strings to the new language files (`yarn extract-locales`)
1. Translate the strings for their equivilent meaningsThe namespaces (common, flashing, etc), provide some context for what the strings relate to
### Structure
The application is split into different contexts
- **Main**: Electron Main Process - initialising the electron application, runs the backend when running in electron. Runs in a Node.JS context
- **Renderer**: React Web Application - Runs in browser or electron renderer process. Shows different UI depending on context.
- **Shared**: Multi-Context code - Designed to run in any environment. Imported by both `Main` or `Renderer`
- **Webworker**: WebWorker Context - `.bootstap` files start-up `.worker` files. Code designed only to run in WebWorker contexts.### Communication
This application makes use of [`GraphQL`](https://graphql.org/) to request data across process boundary. Meaning that the `renderer` process
is always entirely separated from the GraphQL execution environment.[Apollo Bus Link](https://github.com/freshollie/apollo-bus-link) is used to facilitate the communication between the GraphQL execution process
in Electron or Webworker environments.
#### Exceptions
Within WebWorker contexts, there are some browser functions which cannot be invoked within WebWorker contexts
and so have to be invoked in the main process. In order to keep things in Electron and Web processes similar
a set of [Cross Boundary Communication](src/webworker/crossboundary) functions have been defined.## Acknowledgements
A massive thank you to the software which makes all of this possible. Specifically:
- [Flipper Devices](https://flipperzero.one/) for their opensource [DFU library](https://github.com/flipperdevices/webdfu) which runs on [Web USB](https://wicg.github.io/webusb/)
- [Rob Moran](https://github.com/thegecko) for their work on [`node-usb`](https://github.com/node-usb/node-usb) to support WebUSB within Node environments
- [Jimmy Wärting](https://github.com/jimmywarting) for creating a [pollyfill](https://github.com/jimmywarting/native-file-system-adapter) of web filesystem API for Node environments## Screenshots