mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Adding a compile to option to allow users to compile with serial port 1
and 2 defaults switched. This is helpful if you fry a serial port. Compile with `OPTIONS=SWAP_SERIAL_PORT_1_AND_2_DEFAULTS`.
This commit is contained in:
parent
84384e61af
commit
00e0bf806a
1 changed files with 5 additions and 0 deletions
|
@ -214,8 +214,13 @@ void resetTelemetryConfig(telemetryConfig_t *telemetryConfig)
|
|||
|
||||
void resetSerialConfig(serialConfig_t *serialConfig)
|
||||
{
|
||||
#ifdef SWAP_SERIAL_PORT_1_AND_2_DEFAULTS
|
||||
serialConfig->serial_port_scenario[0] = lookupScenarioIndex(SCENARIO_UNUSED);
|
||||
serialConfig->serial_port_scenario[1] = lookupScenarioIndex(SCENARIO_MSP_CLI_TELEMETRY_GPS_PASTHROUGH);
|
||||
#else
|
||||
serialConfig->serial_port_scenario[0] = lookupScenarioIndex(SCENARIO_MSP_CLI_TELEMETRY_GPS_PASTHROUGH);
|
||||
serialConfig->serial_port_scenario[1] = lookupScenarioIndex(SCENARIO_UNUSED);
|
||||
#endif
|
||||
#if (SERIAL_PORT_COUNT > 2)
|
||||
serialConfig->serial_port_scenario[2] = lookupScenarioIndex(SCENARIO_UNUSED);
|
||||
#if (SERIAL_PORT_COUNT > 3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue