mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 06:33:33 +08:00
param: move variable definitions to the top of the file
This commit is contained in:
@@ -78,6 +78,9 @@
|
|||||||
#include "px4_parameters.h"
|
#include "px4_parameters.h"
|
||||||
#include <crc32.h>
|
#include <crc32.h>
|
||||||
|
|
||||||
|
static const char *param_default_file = PX4_ROOTFSDIR"/eeprom/parameters";
|
||||||
|
static char *param_user_file = NULL;
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
# define debug(fmt, args...) do { warnx(fmt, ##args); } while(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();
|
_param_notify_changes();
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *param_default_file = PX4_ROOTFSDIR"/eeprom/parameters";
|
|
||||||
static char *param_user_file = NULL;
|
|
||||||
|
|
||||||
int
|
int
|
||||||
param_set_default_file(const char *filename)
|
param_set_default_file(const char *filename)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,6 +69,13 @@
|
|||||||
|
|
||||||
#include "shmem.h"
|
#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)
|
#define debug(fmt, args...) do { } while(0)
|
||||||
|
|
||||||
#ifdef __PX4_QURT
|
#ifdef __PX4_QURT
|
||||||
@@ -903,13 +910,6 @@ param_reset_excludes(const char *excludes[], int num_excludes)
|
|||||||
_param_notify_changes();
|
_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
|
int
|
||||||
param_set_default_file(const char *filename)
|
param_set_default_file(const char *filename)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user