mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
various: re-work designated initialisers to work with G++
G++ supports a more limited version of designated initialisers. Reorder fields to be in the right order. Make nested initialisers explicit. Signed-off-by: Michael Hope <mlhx@google.com>
This commit is contained in:
parent
c1d1ef0ac9
commit
920cac5253
3 changed files with 29 additions and 32 deletions
|
@ -207,9 +207,9 @@ void init(void)
|
|||
if (feature(FEATURE_SONAR)) {
|
||||
sonarHardware = sonarGetHardwareConfiguration(&masterConfig.batteryConfig);
|
||||
sonarGPIOConfig_t sonarGPIOConfig = {
|
||||
.echoPin = sonarHardware->trigger_pin,
|
||||
.triggerPin = sonarHardware->echo_pin,
|
||||
.gpio = SONAR_GPIO
|
||||
.gpio = SONAR_GPIO,
|
||||
.triggerPin = sonarHardware->echo_pin,
|
||||
.echoPin = sonarHardware->trigger_pin,
|
||||
};
|
||||
pwm_params.sonarGPIOConfig = &sonarGPIOConfig;
|
||||
}
|
||||
|
@ -267,9 +267,9 @@ void init(void)
|
|||
|
||||
#ifdef BEEPER
|
||||
beeperConfig_t beeperConfig = {
|
||||
.gpioPeripheral = BEEP_PERIPHERAL,
|
||||
.gpioPin = BEEP_PIN,
|
||||
.gpioPort = BEEP_GPIO,
|
||||
.gpioPeripheral = BEEP_PERIPHERAL,
|
||||
#ifdef BEEPER_INVERTED
|
||||
.gpioMode = Mode_Out_PP,
|
||||
.isInverted = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue