mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
Remove gps_common.c's dependencies on the mw.h/board.h.
Moved some GPS code from mw.c into gps_common.c. Moved pid values into a pidProfile_t structure; this was done so that gps_common.c does not have a dependency on config_profile.h. pidProfile_t lives in flight_common.h now. Moved gps profile settings from profile_t into gpsProfile_t for the same reason. Removed gps_common.c's dependency on masterConfig_t by passing needed variables into gpsInit().
This commit is contained in:
parent
f8d0dd98f7
commit
2c80094b0e
14 changed files with 332 additions and 251 deletions
|
@ -26,6 +26,7 @@ failsafe_t* failsafeInit(rxConfig_t *intialRxConfig);
|
|||
void pwmInit(drv_pwm_config_t *init, failsafe_t *initialFailsafe);
|
||||
void rxInit(rxConfig_t *rxConfig, failsafe_t *failsafe);
|
||||
void buzzerInit(failsafe_t *initialFailsafe);
|
||||
void gpsInit(uint8_t baudrateIndex, uint8_t initialGpsProvider, gpsProfile_t *initialGpsProfile, pidProfile_t *pidProfile);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
@ -97,7 +98,12 @@ int main(void)
|
|||
rxInit(&masterConfig.rxConfig, failsafe);
|
||||
|
||||
if (feature(FEATURE_GPS) && !feature(FEATURE_SERIALRX)) {
|
||||
gpsInit(masterConfig.gps_baudrate);
|
||||
gpsInit(
|
||||
masterConfig.gps_baudrate,
|
||||
masterConfig.gps_type,
|
||||
¤tProfile.gpsProfile,
|
||||
¤tProfile.pidProfile
|
||||
);
|
||||
}
|
||||
|
||||
#ifdef SONAR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue