param: move variable definitions to the top of the file

This commit is contained in:
Beat Küng 2017-03-24 17:01:52 +01:00 committed by Lorenz Meier
parent a0e2b0c5a2
commit dffba3e03b
2 changed files with 10 additions and 10 deletions

View File

@ -78,6 +78,9 @@
#include "px4_parameters.h"
#include <crc32.h>
static const char *param_default_file = PX4_ROOTFSDIR"/eeprom/parameters";
static char *param_user_file = NULL;
#if 0
# define debug(fmt, args...) do { warnx(fmt, ##args); } while(0)
@ -883,9 +886,6 @@ param_reset_excludes(const char *excludes[], int num_excludes)
_param_notify_changes();
}
static const char *param_default_file = PX4_ROOTFSDIR"/eeprom/parameters";
static char *param_user_file = NULL;
int
param_set_default_file(const char *filename)
{

View File

@ -69,6 +69,13 @@
#include "shmem.h"
#ifdef __PX4_QURT
static const char *param_default_file = "/dev/fs/params";
#else
static const char *param_default_file = "/usr/share/data/adsp/params";
#endif
static char *param_user_file = NULL;
#define debug(fmt, args...) do { } while(0)
#ifdef __PX4_QURT
@ -903,13 +910,6 @@ param_reset_excludes(const char *excludes[], int num_excludes)
_param_notify_changes();
}
#ifdef __PX4_QURT
static const char *param_default_file = "/dev/fs/params";
#else
static const char *param_default_file = "/usr/share/data/adsp/params";
#endif
static char *param_user_file = NULL;
int
param_set_default_file(const char *filename)
{