d-ronin / dRonin

The dRonin flight controller software.
http://dronin.org
Other
289 stars 167 forks source link

RE1/DTFc: Don't brutalise UAVO settings #1370

Open tracernz opened 8 years ago

tracernz commented 8 years ago

Settings should never be overwritten like this (which in this case also precludes using any sensor with the default scaling factor). https://github.com/d-ronin/dRonin/blob/1840a1461ad033fdd748f8b7c3a3bdec6dc25fb2/flight/targets/dtfc/fw/pios_board.c#L304-L308 https://github.com/d-ronin/dRonin/blob/ff3de726463edf6c5ca0d53dc5442f295229a16b/flight/targets/brainre1/fw/pios_board.c#L561-L568

Possible alternatives (in order of preference):

mlyle commented 8 years ago

Could declare the defaults for the uavo as a weak reference in the linker, and let a target override... but then there's the chance that something-not-intended-to-be-overriden could be overridden as defaults change.