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

Web UI button fix #2166

Merged
merged 4 commits into from May 3, 2023
Merged

Conversation

pkendall64
Copy link
Collaborator

@pkendall64 pkendall64 commented Apr 13, 2023

Checks if the button entry is undefined before trying to store data in it.
Also fixes the feedback dialog when saving the button actions.

Fixes #2162

Testing

  1. Use a TTGO (or other TX module with a single button or comment out the second button definition in the Radiomaster Ranger JSON file)
  2. Boot into wifi mode, go to the button tab and press the save button. There should not an error in the web-console and you should see the success dialog.

@JyeSmith
Copy link
Member

I dont currently have my Ranger to test 😞

Copy link
Contributor

@schugabe schugabe left a comment

Choose a reason for hiding this comment

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

With the missing } it fixes the issue

src/html/scan.js Show resolved Hide resolved
Copy link
Member

@CapnBry CapnBry left a comment

Choose a reason for hiding this comment

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

master

  • Flashed master to Ranger, verified both buttons / colors working, able to save values and persist across reboots. Do not get any confirmation popup when saving values. :( ❌
  • Removed "Button 2 pin" and "Button 2 RGB Index" from hardware.html
  • Button 2 now missing from webui, but can't save Button 1's stuff due to "Uncaught type error" in javscript ❌

PR

  • Flashed PR code, can save single button and single LED settings. Do get confirmation popup. ✔️
  • Reset hardware config, can save 2 button and LED settings. Do get confirmation popup ✔️
  • Also tried to trick it by removing "Button 2 pin" but leaving "Button 2 RGB Index". Does not throw any errors saving. The RGB LED still works, but obviously no way to change the value. Get another button, fool! ✔️

@pkendall64 pkendall64 merged commit a806212 into ExpressLRS:master May 3, 2023
38 checks passed
@pkendall64 pkendall64 deleted the web-ui-button-fix branch May 12, 2023 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DIY 900 TX TTGO V1 SX127x - WIFI - Buttons - Save issues
4 participants