Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MSP Radio emulator in PWA #3939

Merged
merged 2 commits into from
May 7, 2024

Conversation

McGiverGim
Copy link
Member

This makes working again the MSP radio emulator under PWA.
With this changes, it works under PWA and under NW.js.

image

BUT I've marked it as draft because under PWA only works with yarn dev but not under yarn review. I suspect it has something to do with https://vitejs.dev/guide/build#multi-page-app but I'm not sure. I tried to add this config to the code without luck. Some idea?

Copy link

netlify bot commented May 7, 2024

Deploy Preview for origin-betaflight-app ready!

Name Link
🔨 Latest commit c74cceb
🔍 Latest deploy log https://app.netlify.com/sites/origin-betaflight-app/deploys/663a6caf861c160008c15181
😎 Deploy Preview https://deploy-preview-3939--origin-betaflight-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

This comment has been minimized.

@McGiverGim
Copy link
Member Author

McGiverGim commented May 7, 2024

Added a new commit that fixes the issue with the "build" version of PWA. Now works, but maybe my solution is not good enough, but we can make it better with the reviews.

I let it in two commits, to see the difference of what's needed for Vite dev and what is needed for Vite build.

@McGiverGim McGiverGim marked this pull request as ready for review May 7, 2024 18:00
Copy link

sonarqubecloud bot commented May 7, 2024

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

github-actions bot commented May 7, 2024

Do you want to test this code? Here you have an automated build:
Betaflight-Configurator-Android
Betaflight-Configurator-Linux
Betaflight-Configurator-Windows
Betaflight-Configurator-macOS
WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is not need really to rename this if we specify the input with rollupOptions

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really a tab - could we rename it to /receiver_msp.html instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried but it didn't work. My first idea was to add it as subfolder inside the tabs one, and without renaming it, but it didn't work. Maybe I did something wrong, but I didn't found the problem.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haslinghuis it seems now it works, I don't know why yesterday don't. I will push a new PR renaming it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really a tab - could we rename it to /receiver_msp.html instead?

Copy link
Member

@haslinghuis haslinghuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible have something to do with the rollupOptions used in Vite

@haslinghuis haslinghuis merged commit d354567 into betaflight:master May 7, 2024
12 checks passed
VitroidFPV pushed a commit to VitroidFPV/betaflight-configurator that referenced this pull request May 13, 2024
* Fix MSP Radio emulator in PWA

* Fix MSP Radio Emulator for PWA build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants