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
|
@ -214,8 +214,13 @@ void resetTelemetryConfig(telemetryConfig_t *telemetryConfig)
|
||||||
|
|
||||||
void resetSerialConfig(serialConfig_t *serialConfig)
|
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[0] = lookupScenarioIndex(SCENARIO_MSP_CLI_TELEMETRY_GPS_PASTHROUGH);
|
||||||
serialConfig->serial_port_scenario[1] = lookupScenarioIndex(SCENARIO_UNUSED);
|
serialConfig->serial_port_scenario[1] = lookupScenarioIndex(SCENARIO_UNUSED);
|
||||||
|
#endif
|
||||||
#if (SERIAL_PORT_COUNT > 2)
|
#if (SERIAL_PORT_COUNT > 2)
|
||||||
serialConfig->serial_port_scenario[2] = lookupScenarioIndex(SCENARIO_UNUSED);
|
serialConfig->serial_port_scenario[2] = lookupScenarioIndex(SCENARIO_UNUSED);
|
||||||
#if (SERIAL_PORT_COUNT > 3)
|
#if (SERIAL_PORT_COUNT > 3)
|
||||||
|
|
Loading…
Reference in New Issue