mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
Removing Custom Defaults (#12425)
This commit is contained in:
parent
68136910d0
commit
ee77239db1
48 changed files with 155 additions and 552 deletions
|
@ -672,12 +672,7 @@ static bool mspCommonProcessOutCommand(int16_t cmdMSP, sbuf_t *dst, mspPostProce
|
|||
#if defined(USE_FLASH_BOOT_LOADER)
|
||||
targetCapabilities |= BIT(TARGET_HAS_FLASH_BOOTLOADER);
|
||||
#endif
|
||||
#if defined(USE_CUSTOM_DEFAULTS)
|
||||
targetCapabilities |= BIT(TARGET_SUPPORTS_CUSTOM_DEFAULTS);
|
||||
if (hasCustomDefaults()) {
|
||||
targetCapabilities |= BIT(TARGET_HAS_CUSTOM_DEFAULTS);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(USE_RX_BIND)
|
||||
if (getRxBindSupported()) {
|
||||
targetCapabilities |= BIT(TARGET_SUPPORTS_RX_BIND);
|
||||
|
@ -2487,25 +2482,14 @@ static mspResult_e mspFcProcessOutCommandWithArg(mspDescriptor_t srcDesc, int16_
|
|||
|
||||
case MSP_RESET_CONF:
|
||||
{
|
||||
#if defined(USE_CUSTOM_DEFAULTS)
|
||||
defaultsType_e defaultsType = DEFAULTS_TYPE_CUSTOM;
|
||||
#endif
|
||||
if (sbufBytesRemaining(src) >= 1) {
|
||||
// Added in MSP API 1.42
|
||||
#if defined(USE_CUSTOM_DEFAULTS)
|
||||
defaultsType = sbufReadU8(src);
|
||||
#else
|
||||
sbufReadU8(src);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool success = false;
|
||||
if (!ARMING_FLAG(ARMED)) {
|
||||
#if defined(USE_CUSTOM_DEFAULTS)
|
||||
success = resetEEPROM(defaultsType == DEFAULTS_TYPE_CUSTOM);
|
||||
#else
|
||||
success = resetEEPROM(false);
|
||||
#endif
|
||||
success = resetEEPROM();
|
||||
|
||||
if (success && mspPostProcessFn) {
|
||||
rebootMode = MSP_REBOOT_FIRMWARE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue