mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Remove unused resetSonarConfig and add default pin (NONE)
This commit is contained in:
parent
981df1d544
commit
ab31cc2667
2 changed files with 7 additions and 12 deletions
|
@ -197,18 +197,6 @@ PG_RESET_TEMPLATE(sdcardConfig_t, sdcardConfig,
|
|||
// no template required since defaults are zero
|
||||
PG_REGISTER(vcdProfile_t, vcdProfile, PG_VCD_CONFIG, 0);
|
||||
|
||||
#ifdef SONAR
|
||||
void resetSonarConfig(sonarConfig_t *sonarConfig)
|
||||
{
|
||||
#if defined(SONAR_TRIGGER_PIN) && defined(SONAR_ECHO_PIN)
|
||||
sonarConfig->triggerTag = IO_TAG(SONAR_TRIGGER_PIN);
|
||||
sonarConfig->echoTag = IO_TAG(SONAR_ECHO_PIN);
|
||||
#else
|
||||
#error Sonar not defined for target
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_ADC
|
||||
void pgResetFn_adcConfig(adcConfig_t *adcConfig)
|
||||
{
|
||||
|
|
|
@ -53,6 +53,13 @@ static int32_t calculatedAltitude;
|
|||
|
||||
PG_REGISTER_WITH_RESET_TEMPLATE(sonarConfig_t, sonarConfig, PG_SONAR_CONFIG, 0);
|
||||
|
||||
#ifndef SONAR_TRIGGER_PIN
|
||||
#define SONAR_TRIGGER_PIN NONE
|
||||
#endif
|
||||
#ifndef SONAR_ECHO_PIN
|
||||
#define SONAR_ECHO_PIN NONE
|
||||
#endif
|
||||
|
||||
PG_RESET_TEMPLATE(sonarConfig_t, sonarConfig,
|
||||
.triggerTag = IO_TAG(SONAR_TRIGGER_PIN),
|
||||
.echoTag = IO_TAG(SONAR_ECHO_PIN)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue