diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..11386694 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,8 @@ +*.json +*.html +*.less +*.css +package.json +docusaurus.config.js +public/ +src/vendor/ \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..0d873570 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,40 @@ +module.exports = { + parserOptions: { + ecmaVersion: 2020, + sourceType: 'module', + }, + extends: ['eslint:recommended', 'prettier'], + root: true, + env: { + node: true, + jquery: true, + es2017: true, + browser: true, + webextensions: true, + }, + rules: { + // TODO: currently a lot of these issues are marked as + // warnings because they are in the codebase already + // and I don't want to fix them all at once. + // Eventually, they should be fixed and the rules + // should be set to 'error' (default in preset). + 'no-var': 'warn', + 'no-unused-vars': 'warn', + 'no-undef': 'warn', + 'no-redeclare': 'warn', + 'no-prototype-builtins': 'warn', + 'no-empty': 'warn', + 'no-inner-declarations': 'warn', + 'no-fallthrough': 'warn', + 'no-useless-escape': 'warn', + 'no-constant-condition': 'warn', + 'no-unreachable': 'warn', + 'no-duplicate-case': 'warn', + 'no-dupe-keys': 'warn', + 'no-irregular-whitespace': 'warn', + 'no-case-declarations': 'warn', + 'prefer-template': 'warn', + 'comma-dangle': ['warn', 'always-multiline'], + semi: ['error', 'always'], + }, +}; diff --git a/.lintstagedrc b/.lintstagedrc new file mode 100644 index 00000000..a0018896 --- /dev/null +++ b/.lintstagedrc @@ -0,0 +1,7 @@ +{ + "**/*.{tsx,js}": [ + "prettier --write --ignore-unknown", + "eslint --fix --ext .tsx,.js" + ], + "**/*.{html,md,mdx,less,css,json}": ["prettier --write --ignore-unknown"] +} \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..7cbc1aba --- /dev/null +++ b/.prettierignore @@ -0,0 +1,36 @@ +# node.js npm related + +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Configurator Build process +cache/ +apps/ +dist/ +public/ +src/vendor/ +dist_cordova/ +debug/ +release/ +testresults/ +.eslintcache +cordova/bundle.keystore + +# OSX +.DS_store + +# artefacts for Visual Studio Code +/.vscode/ + +# NetBeans +nbproject/ + +# IntelliJ +.idea + +# Eclipse +.project +.settings/ +test-results-junit/ \ No newline at end of file diff --git a/README.md b/README.md index 42184b3e..aa3232f2 100644 --- a/README.md +++ b/README.md @@ -19,15 +19,19 @@ Current blackbox explorer version is built as Meaning it can work in both online and offline modes as regular desktop app would. -### Web +### Latest stable version -1. Visit https://blackbox.betaflight.com/ -2. Use the app +For the latest stable released version visit https://blackbox.betaflight.com/ -### Standalone +### Unstable testing versions -1. Visit https://blackbox.betaflight.com/ -2. Follow the procedure to install PWA on your platform. On MacOS chrome: +The latest master build is always available at https://master.dev.blackbox.betaflight.com/ + +**Be aware that these versions are intended for testing / feedback only, and may be buggy or broken. Caution is advised when using these versions.** + +### Install the app to be used in offline mode + +Follow the procedure to install PWA on your platform. For example on MacOS chrome: ![Url bar PWA install](screenshots/url-bar.webp) ![PWA install dialog](screenshots/pwa-install-dialog.webp) @@ -64,7 +68,7 @@ performance. ### Node setup We are using [nvm](https://github.com/nvm-sh/nvm) to manage the correct node -vesion, follow the install instruction there. After which from blackbox directory +vesion, follow the install instructions there. After which from blackbox directory just run: ```bash @@ -74,7 +78,7 @@ nvm use ### Yarn For dependency management we are using [yarn](https://yarnpkg.com/), follow the -instruction there to install it. +instructions there to install it. ### Development mode @@ -87,24 +91,26 @@ With `node` and `yarn` setup, to start developing run: yarn start ``` -This will start development server on http://localhost:5173/. +This will start development server and the Blackbox will be available on http://localhost:5173/. -## Installing Dev Build locally +### Installing development build locally If you want to have latest and greatest version installed on your machine from the tip of the repository: -1. First need to build the application: + +First need to build the application: ```bash yarn build ``` -2. Start the application in `preview` mode +Then start the application in `preview` mode ```bash yarn preview ``` -3. Visit http://localhost:4173/ -4. Follow the steps from [Standalone](#standalone) +Visit http://localhost:4173/ and follow the steps from [Install the app to be used in offline mode](#install-the-app-to-be-used-in-offline-mode) + +## Common problems -## Flight video won't load, or jumpy flight video upon export +### Flight video won't load, or jumpy flight video upon export Some flight video formats aren't supported by Chrome, so the viewer can't open them. You can fix this by re-encoding your video using the free tool diff --git a/changelog.html b/changelog.html deleted file mode 100644 index cc54cde3..00000000 --- a/changelog.html +++ /dev/null @@ -1,397 +0,0 @@ - - - - - - Betaflight - Blackbox Explorer Changelog - - - - - - -
-

3.5.0 - Updates for Betaflight 4.2.0

- - - -

3.4.0 - Updates for Betaflight 4.1.0

- - - -

3.3.0 - Updates for Betaflight 4.0.0

- - - -

3.2.0 - Updates for Betaflight 3.5.0

- - - -

3.1.0 - Standalone app

- - -

3.0.0 - Standalone app

- - -

2.5.13 - Minor Fixes

- - -

2.5.12 - Minor Fixes

- - -

2.5.11 - Minor Fixes

- - -

2.5.10 - Minor Bug Fixes

- - - -

2.5.9 - Minor Bug Fixes

- -

Observations during BF3.1.0 Release Candidate Testing.

- - - -

2.5.8 - DShot Logging and Minor Bug Fixes

- -

Some fixes in response to user observations.

- - - -

2.5.7 - Minor Bug Fixes and Feature Improvements

- -
-

Notes

- -

Log file extension

- -

BB Viewer attempts to determine the file type you are opening by examining the file extension first. Where no file extension is used in the name, - then BB Viewer will guess the type of file; which is usually fine for small log files (<10MB).

-

For log files larger than 10MB, then BB Viewer guesses they are video files and tries to load it (and fails because it is not a video)

-

So as a tip, it's best to use a file extension when you save your logs.

-

The file extensions that are automatically recognised are: -

- - -

If it is not one of those extensions, it takes a guess on the type by file size (if file-size < 10MB then Log file else its a video);

- -

Mousewheel Improvements

-

- As you are probably already aware, scrolling the mouse wheel whilst the mouse pointer is over the graph will move the timeline forwards and backwards: - -

-

But now, thanks to suggestions from Joshua Bardwell, the mouse wheel functionality has been extended... - With the mouse pointer over a field in the graph legend...

- - -

With the mouse pointer over the field group heading and then scrolling the mouse-wheel will adjust all fields within the group at the same time.

-

Finally, if you "click" the middle mouse button, then the dynamic settings go back to the values you first set in the graph config dialog when - choosing the fields. Again, clicking on a single field will reset just that field, clicking on the group header will reset all pens within the group.

-

So it is no longer necessary to keep going into the graph config dialog to adjust the values; just use the mouse wheel...

-

The smoothing, zooming and expo dynamic changing above do not affect workspaces so you can always go back to your preferred settings by re-selecting the workspace.

- -

You will also notice now that to scroll the whole page using the mouse-wheel, you must move the pointer off both the graph and legend areas - (e.g move the pointer to the toolbar area and then scroll the wheel.

-

Grids

-

-

-

-
- -

2.5.6 - Some minor field name relabelling.

- - -

2.5.5 - Minor code cleanups and re-scaling of rate calculations (for Betaflight v3.0.0 RC12).

- - - -

2.5.4 - Mainly User Interface Tweaks.

- - - -

2.5.3 - Patch Update for Notch Filter Widths

- - - -

2.5.2 - Minor Bug Fixes and Analyser Tweaks

-

Some fixes and modifications resulting from user suggestions.

- - - -

2.5.1 - Header Updates and New Analyser

- -

This is a maintenance release.

- - - -

2.5.0 - Grids, INAV Header Support and Stick Trails.

- -

New Features

- - Now also available in chrome store! - -

Some New Features and minor code cleanups

- - - -
-

Notes on Grid Background

- -

By default, no grids are shown on the graphs.

- -

To add a grid background to the chart, 'ALT' Click the graph field name that you want the grid to show for.

-

To select another field to show the grid for, 'ALT' click another field.

-

To remove the grid, 'ALT' click the field again (it is a toggle).

-

Grid settings are workspace aware, so you can have different configurations for each workspace. (Just save the workspace after you have setup the grid display).

- -

With grids shown, pressing the 'G' key will toggle the grid display on/off globally so that you can quickly hide the grid.

- -

The lines on the grid represent 100ms time slots and each horizontal gridline represents 20% of the range of the signal. It makes it easier to see how the expo setting for the graph emphasises the centre section of the graph.

-
- -

Other Changes prior to 2.5.0

- - - -
- diff --git a/index.html b/index.html index db27284c..5218a8d4 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@ - + @@ -142,15 +142,6 @@

Welcome to the Enhanced Blackbox Explorer!

- -
-
- Changelog -
-
- -
-