Skip to content

Commit

Permalink
Second doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Jan 28, 2024
1 parent 9d4e487 commit 9dc417e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,13 @@ Mycila::JSY.resetEnergy();
### Update Baud rate (change speed)

```c++
if (Mycila::JSY.isEnabled() && Mycila::JSY.getBaudRate() != Mycila::JSYBaudRate::BAUD_38400 && Mycila::JSY.updateBaudRate(Mycila::JSYBaudRate::BAUD_38400)) {
ESP.restart();
if (Mycila::JSY.isEnabled() && Mycila::JSY.getBaudRate() != Mycila::JSYBaudRate::BAUD_38400) {
if (Mycila::JSY.updateBaudRate(Mycila::JSYBaudRate::BAUD_38400)) {
// speed changed and switched to new speed
} else {
// speed changed failed, keeping current speed
}

}
```

Expand Down
9 changes: 7 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,13 @@ Mycila::JSY.resetEnergy();
### Update Baud rate (change speed)

```c++
if (Mycila::JSY.isEnabled() && Mycila::JSY.getBaudRate() != Mycila::JSYBaudRate::BAUD_38400 && Mycila::JSY.updateBaudRate(Mycila::JSYBaudRate::BAUD_38400)) {
ESP.restart();
if (Mycila::JSY.isEnabled() && Mycila::JSY.getBaudRate() != Mycila::JSYBaudRate::BAUD_38400) {
if (Mycila::JSY.updateBaudRate(Mycila::JSYBaudRate::BAUD_38400)) {
// speed changed and switched to new speed
} else {
// speed changed failed, keeping current speed
}

}
```

Expand Down

0 comments on commit 9dc417e

Please sign in to comment.