Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated Async Mode Documentation - Removed "Next" from navbar
- Loading branch information
1 parent
883090f
commit 742d2a7
Showing
3 changed files
with
51 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: Auto Reboot | ||
sidebar_label: Auto Reboot | ||
sidebar_position: 6 | ||
--- | ||
|
||
## Introduction | ||
|
||
Often there comes a situation where you don't want to reboot automatically. In these cases, you can use the `setAutoReboot` function which will enable/disable automatic reboot of your microcontroller after a successful OTA update. | ||
|
||
## Setting Auto Reboot | ||
|
||
You can set up auto reboot for your device using the `ElegantOTA.setAutoReboot(false);` function. This functions takes `true` or `false` to enable / disable automatic reboot. You can use this function anywhere in your code. | ||
|
||
### Example Usage | ||
|
||
```cpp | ||
#include <ElegantOTA.h> | ||
|
||
void setup() { | ||
// Initialize your hardware and other configurations here | ||
|
||
// Disable Auto Reboot | ||
ElegantOTA.setAutoReboot(false); | ||
|
||
// Additional setup code | ||
} | ||
|
||
void loop() { | ||
// Your main loop code here | ||
} | ||
``` | ||
|
||
In the above example, the `ElegantOTA.setAutoReboot(false);` function call disables automatic reboot. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters