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

optional update mode #19

Open
mjtrini opened this issue Dec 10, 2024 · 4 comments
Open

optional update mode #19

mjtrini opened this issue Dec 10, 2024 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mjtrini
Copy link

mjtrini commented Dec 10, 2024

Hi,

I want to thank you for your awesome work on the library. For my purposes I don't need the file system to be updated. Can those two buttons be removed or hidden?

Regards,
Michael.

@IPdotSetAF
Copy link
Owner

Hey michael.

Thanks for your feedback.
Yes that could be a good option. It could be implemented using build flags so you can disable one of the update modes (either flash or fs).

@IPdotSetAF IPdotSetAF added enhancement New feature or request good first issue Good for newcomers labels Dec 10, 2024
@mjtrini
Copy link
Author

mjtrini commented Dec 10, 2024

Good day Mohammad,

Thank you for the rapid response! How exactly do I disable the filesystem update mode?

Regards,
Michael.

@IPdotSetAF
Copy link
Owner

@mjtrini to achieve this we need to introduce a new build flag: ESPASYNCHTTPUPDATESERVER_MODE.

the behavior will be like this:

  • ESPASYNCHTTPUPDATESERVER_MODE = 0 => Both Update (default)
  • ESPASYNCHTTPUPDATESERVER_MODE = 1 => Only Flash Update
  • ESPASYNCHTTPUPDATESERVER_MODE = 2 => Only FS Update

In this Code Block, the html content of the web pages are stored, in order to edit them you need to follow these steps:

  1. follow the https://gchq.github.io/.... links above each index. (there are two pages for stylized and non-styled pages)
  2. remove the blog corresponding to flash update and copy the resulting array. -> add it in the code with proper conditions
  3. remove the blog corresponding to fs update and copy the resulting array. -> add it in the code with proper conditions

now you can switch between them in your project using these build flags in your platformio.ini:

build_flags = 
	-DESPASYNCHTTPUPDATESERVER_PRETTY
	-DESPASYNCHTTPUPDATESERVER_MODE=1
	;-DESPASYNCHTTPUPDATESERVER_MODE=2

Remember to create a fork from this repository and commit your changes into that repo so i can merge your changes into the library properly.

Feel free to ask if there is any uncertainty or question.

GoodLuck

@mjtrini mjtrini closed this as completed Dec 10, 2024
@mjtrini
Copy link
Author

mjtrini commented Dec 10, 2024

Thanks much!

@IPdotSetAF IPdotSetAF changed the title file sytem buttons removal optional update mode Dec 11, 2024
@IPdotSetAF IPdotSetAF reopened this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants