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:
Dominic Clifton 2014-10-31 21:00:53 +00:00
parent 84384e61af
commit 00e0bf806a
1 changed files with 5 additions and 0 deletions

View File

@ -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)