1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 05:45:31 +03:00

Replace cli command gps_initial_baudrate_index with gps_baudrate.

The index is not really a user concern and leads to confusion.  gps
baudrate is not set like any other baud date and the determination of an
appropriate index is hidden from the user.

If the user specifies a baudrate that is not supported the default index
is used which is current the index for 115200.

This also allows GPS to work on softserial ports at up to 19200.
This commit is contained in:
Dominic Clifton 2014-05-23 11:49:24 +01:00
parent 8103449129
commit f232b831d2
8 changed files with 36 additions and 13 deletions

View file

@ -62,7 +62,7 @@ failsafe_t* failsafeInit(rxConfig_t *intialRxConfig);
void pwmInit(drv_pwm_config_t *init);
void rxInit(rxConfig_t *rxConfig, failsafe_t *failsafe);
void buzzerInit(failsafe_t *initialFailsafe);
void gpsInit(serialConfig_t *serialConfig, uint8_t baudrateIndex, uint8_t initialGpsProvider, gpsProfile_t *initialGpsProfile, pidProfile_t *pidProfile);
void gpsInit(serialConfig_t *serialConfig, uint8_t initialGpsProvider, gpsProfile_t *initialGpsProfile, pidProfile_t *pidProfile);
bool sensorsAutodetect(sensorAlignmentConfig_t *sensorAlignmentConfig, uint16_t gyroLpf, uint8_t accHardwareToUse, int16_t magDeclinationFromConfig);
void imuInit(void);
@ -201,7 +201,6 @@ void init(void)
if (feature(FEATURE_GPS)) {
gpsInit(
&masterConfig.serialConfig,
masterConfig.gps_initial_baudrate_index,
masterConfig.gps_provider,
&currentProfile.gpsProfile,
&currentProfile.pidProfile