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

Command BrRestart to restart the Berry VM (experimental) #19003

Merged
merged 2 commits into from
Jul 2, 2023

Conversation

s-hadinger
Copy link
Collaborator

@s-hadinger s-hadinger commented Jun 29, 2023

Description:

The command BrRestart deletes the current Berry Virtual Machine and creates a new one, and initalize it (including loading of autoexec.be).

This is an experimental feature only useful for Berry developers, and facilitates testing without waiting for a full Tasmota restart.

Limitations: unfortunately Arduino is not able to deregister Request Handlers in the local web server. So restarting the Berry VM breaks all WebUI implemented in Berry (webser.on()). I don't see any way to solve this for now.

If #define USE_BERRY_DEBUG is defined, a new "Restart Berry VM" button is added to the Berry console:
image

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.4.9
  • The code change is tested and works with Tasmota core ESP32 V.2.0.10
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@btsimonh
Copy link
Contributor

btsimonh commented Jul 1, 2023

multiple times when testing berry code, I've found that it does not work after a restart because I'd forgotten about some global variable I'd made earlier, and that the module under test depended on.... so i'd find this useful.

@s-hadinger s-hadinger merged commit d72f3b9 into arendst:development Jul 2, 2023
RaphDaMan pushed a commit to RaphDaMan/Tasmota that referenced this pull request Sep 10, 2024
…#19003)

* Command ``BrRestart`` to restart the Berry VM (experimental)

* Add web button for Berry Restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants