LinkRawCable: default to max baud rate

This commit is contained in:
Rodrigo Alfonso 2025-02-14 23:50:30 -03:00
parent bb2d417f3f
commit 724d21e75d
2 changed files with 3 additions and 3 deletions

View File

@ -217,7 +217,7 @@ You can update these values at any time without creating a new instance by mutat
| Name | Return type | Description |
| ---------------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `isActive()` | **bool** | Returns whether the library is active or not. |
| `activate(baudRate = BAUD_RATE_1)` | - | Activates the library in a specific `baudRate` (`LinkRawCable::BaudRate`). |
| `activate(baudRate = BAUD_RATE_3)` | - | Activates the library in a specific `baudRate` (`LinkRawCable::BaudRate`). |
| `deactivate()` | - | Deactivates the library. |
| `transfer(data)` | **Response** | Exchanges `data` with the connected consoles. Returns the received data, including the assigned player ID. |
| `transfer(data, cancel)` | **Response** | Like `transfer(data)` but accepts a `cancel()` function. The library will continuously invoke it, and abort the transfer if it returns `true`. |

View File

@ -97,9 +97,9 @@ class LinkRawCable {
/**
* @brief Activates the library in a specific `baudRate`.
* @param baudRate One of the enum values from `LinkRawCable::BaudRate`.
* Defaults to `LinkRawCable::BaudRate::BAUD_RATE_1` (38400 bps).
* Defaults to `LinkRawCable::BaudRate::BAUD_RATE_3` (115200 bps).
*/
void activate(BaudRate baudRate = BaudRate::BAUD_RATE_1) {
void activate(BaudRate baudRate = BaudRate::BAUD_RATE_3) {
LINK_READ_TAG(LINK_RAW_CABLE_VERSION);
this->baudRate = baudRate;