mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Merge pull request #2060 from martinbudden/bf_serial_task_rate
Added CLI option to set serial task update rate
This commit is contained in:
commit
c3b33d5683
4 changed files with 9 additions and 8 deletions
|
@ -439,10 +439,11 @@ void resetBatteryConfig(batteryConfig_t *batteryConfig)
|
|||
|
||||
void resetSerialConfig(serialConfig_t *serialConfig)
|
||||
{
|
||||
uint8_t index;
|
||||
memset(serialConfig, 0, sizeof(serialConfig_t));
|
||||
serialConfig->serial_update_rate_hz = 100;
|
||||
serialConfig->reboot_character = 'R';
|
||||
|
||||
for (index = 0; index < SERIAL_PORT_COUNT; index++) {
|
||||
for (int index = 0; index < SERIAL_PORT_COUNT; index++) {
|
||||
serialConfig->portConfigs[index].identifier = serialPortIdentifiers[index];
|
||||
serialConfig->portConfigs[index].msp_baudrateIndex = BAUD_115200;
|
||||
serialConfig->portConfigs[index].gps_baudrateIndex = BAUD_57600;
|
||||
|
@ -451,13 +452,10 @@ void resetSerialConfig(serialConfig_t *serialConfig)
|
|||
}
|
||||
|
||||
serialConfig->portConfigs[0].functionMask = FUNCTION_MSP;
|
||||
|
||||
#if defined(USE_VCP)
|
||||
// This allows MSP connection via USART & VCP so the board can be reconfigured.
|
||||
serialConfig->portConfigs[1].functionMask = FUNCTION_MSP;
|
||||
#endif
|
||||
|
||||
serialConfig->reboot_character = 'R';
|
||||
}
|
||||
|
||||
void resetRcControlsConfig(rcControlsConfig_t *rcControlsConfig)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue