1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 20:10:18 +03:00

Merge branch 'fix_custom_defaults_addresses' into add_custom_defaults_to_msp

This commit is contained in:
mikeller 2019-09-01 14:27:57 +12:00
commit 36dc7306e2
4 changed files with 15 additions and 15 deletions

View file

@ -34,13 +34,6 @@ SECTIONS
. = ALIGN(4);
} >FLASH AT >AXIM_FLASH
/* Storage for the address for the configuration section so we can grab it out of the hex file */
.custom_defaults :
{
. = ALIGN(4);
*(.custom_defaults_address)
} >FLASH1 AT >AXIM_FLASH1
/* The program code and other data goes into FLASH */
.text :
{
@ -103,7 +96,9 @@ SECTIONS
.custom_defaults :
{
. = ALIGN(4);
KEEP (*(.custom_defaults_address))
KEEP (*(.custom_defaults_start_address))
. = ALIGN(4);
KEEP (*(.custom_defaults_end_address))
. = ALIGN(4);
__custom_defaults_internal_start = .;
*(.custom_defaults);

View file

@ -120,7 +120,9 @@ SECTIONS
.custom_defaults :
{
. = ALIGN(4);
KEEP (*(.custom_defaults_address))
KEEP (*(.custom_defaults_start_address))
. = ALIGN(4);
KEEP (*(.custom_defaults_end_address))
. = ALIGN(4);
__custom_defaults_internal_start = .;
*(.custom_defaults);

View file

@ -228,8 +228,8 @@ static char cliBufferTemp[CLI_IN_BUFFER_SIZE];
#endif
#if defined(USE_CUSTOM_DEFAULTS_ADDRESS)
static char __attribute__ ((section(".custom_defaults_address"))) *customDefaultsStart = CUSTOM_DEFAULTS_START;
static char __attribute__ ((section(".custom_defaults_address"))) *customDefaultsEnd = CUSTOM_DEFAULTS_END;
static char __attribute__ ((section(".custom_defaults_start_address"))) *customDefaultsStart = CUSTOM_DEFAULTS_START;
static char __attribute__ ((section(".custom_defaults_end_address"))) *customDefaultsEnd = CUSTOM_DEFAULTS_END;
#endif
#ifndef USE_QUAD_MIXER_ONLY
@ -4140,7 +4140,7 @@ static bool doSave(void)
{
#if defined(USE_CUSTOM_DEFAULTS)
if (processingCustomDefaults) {
return false;
return true;
}
#endif
@ -4174,12 +4174,15 @@ static void cliSave(char *cmdline)
{
UNUSED(cmdline);
#if defined(USE_CLI_BATCH)
if (!doSave()) {
cliPrintCommandBatchWarning("PLEASE FIX ERRORS THEN 'SAVE'");
resetCommandBatch();
return;
} else {
} else
#endif
{
cliPrintHashLine("saving");
}

View file

@ -265,7 +265,7 @@ void beeperOffSet(uint32_t) {}
void beeperOffClear(uint32_t) {}
void beeperOffClearAll(void) {}
bool parseColor(int, const char *) {return false; }
void resetEEPROM(bool) {}
bool resetEEPROM(bool) { return true; }
void bufWriterFlush(bufWriter_t *) {}
void mixerResetDisarmedMotors(void) {}
void gpsEnablePassthrough(struct serialPort_s *) {}