mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-17 10:01:36 +08:00
[DO NOT MERGE] parameter testing
This commit is contained in:
@@ -147,6 +147,8 @@ else
|
|||||||
|
|
||||||
param dump $PARAM_FILE
|
param dump $PARAM_FILE
|
||||||
|
|
||||||
|
hexdump $PARAM_FILE
|
||||||
|
|
||||||
if [ -d "/fs/microsd" ]
|
if [ -d "/fs/microsd" ]
|
||||||
then
|
then
|
||||||
dmesg >> /fs/microsd/param_import_fail.txt &
|
dmesg >> /fs/microsd/param_import_fail.txt &
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
# CONFIG_NSH_DISABLE_EXEC is not set
|
# CONFIG_NSH_DISABLE_EXEC is not set
|
||||||
# CONFIG_NSH_DISABLE_EXIT is not set
|
# CONFIG_NSH_DISABLE_EXIT is not set
|
||||||
# CONFIG_NSH_DISABLE_GET is not set
|
# CONFIG_NSH_DISABLE_GET is not set
|
||||||
|
# CONFIG_NSH_DISABLE_HEXDUMP is not set
|
||||||
# CONFIG_NSH_DISABLE_ITEF is not set
|
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||||
# CONFIG_NSH_DISABLE_LOOPS is not set
|
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||||
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
# CONFIG_NSH_DISABLE_EXEC is not set
|
# CONFIG_NSH_DISABLE_EXEC is not set
|
||||||
# CONFIG_NSH_DISABLE_EXIT is not set
|
# CONFIG_NSH_DISABLE_EXIT is not set
|
||||||
# CONFIG_NSH_DISABLE_GET is not set
|
# CONFIG_NSH_DISABLE_GET is not set
|
||||||
|
# CONFIG_NSH_DISABLE_HEXDUMP is not set
|
||||||
# CONFIG_NSH_DISABLE_ITEF is not set
|
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||||
# CONFIG_NSH_DISABLE_LOOPS is not set
|
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||||
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
||||||
|
|||||||
@@ -144,7 +144,6 @@ CONFIG_NSH_CROMFSETC=y
|
|||||||
CONFIG_NSH_DISABLE_BASENAME=y
|
CONFIG_NSH_DISABLE_BASENAME=y
|
||||||
CONFIG_NSH_DISABLE_DIRNAME=y
|
CONFIG_NSH_DISABLE_DIRNAME=y
|
||||||
CONFIG_NSH_DISABLE_EXPORT=y
|
CONFIG_NSH_DISABLE_EXPORT=y
|
||||||
CONFIG_NSH_DISABLE_HEXDUMP=y
|
|
||||||
CONFIG_NSH_DISABLE_LOSETUP=y
|
CONFIG_NSH_DISABLE_LOSETUP=y
|
||||||
CONFIG_NSH_DISABLE_MKFIFO=y
|
CONFIG_NSH_DISABLE_MKFIFO=y
|
||||||
CONFIG_NSH_DISABLE_MKRD=y
|
CONFIG_NSH_DISABLE_MKRD=y
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
# CONFIG_NSH_DISABLE_EXEC is not set
|
# CONFIG_NSH_DISABLE_EXEC is not set
|
||||||
# CONFIG_NSH_DISABLE_EXIT is not set
|
# CONFIG_NSH_DISABLE_EXIT is not set
|
||||||
# CONFIG_NSH_DISABLE_GET is not set
|
# CONFIG_NSH_DISABLE_GET is not set
|
||||||
|
# CONFIG_NSH_DISABLE_HEXDUMP is not set
|
||||||
# CONFIG_NSH_DISABLE_ITEF is not set
|
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||||
# CONFIG_NSH_DISABLE_LOOPS is not set
|
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||||
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
# CONFIG_NSH_DISABLE_EXEC is not set
|
# CONFIG_NSH_DISABLE_EXEC is not set
|
||||||
# CONFIG_NSH_DISABLE_EXIT is not set
|
# CONFIG_NSH_DISABLE_EXIT is not set
|
||||||
# CONFIG_NSH_DISABLE_GET is not set
|
# CONFIG_NSH_DISABLE_GET is not set
|
||||||
|
# CONFIG_NSH_DISABLE_HEXDUMP is not set
|
||||||
# CONFIG_NSH_DISABLE_ITEF is not set
|
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||||
# CONFIG_NSH_DISABLE_LOOPS is not set
|
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||||
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
# CONFIG_NSH_DISABLE_EXEC is not set
|
# CONFIG_NSH_DISABLE_EXEC is not set
|
||||||
# CONFIG_NSH_DISABLE_EXIT is not set
|
# CONFIG_NSH_DISABLE_EXIT is not set
|
||||||
# CONFIG_NSH_DISABLE_GET is not set
|
# CONFIG_NSH_DISABLE_GET is not set
|
||||||
|
# CONFIG_NSH_DISABLE_HEXDUMP is not set
|
||||||
# CONFIG_NSH_DISABLE_ITEF is not set
|
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||||
# CONFIG_NSH_DISABLE_LOOPS is not set
|
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||||
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
# CONFIG_NSH_DISABLE_EXEC is not set
|
# CONFIG_NSH_DISABLE_EXEC is not set
|
||||||
# CONFIG_NSH_DISABLE_EXIT is not set
|
# CONFIG_NSH_DISABLE_EXIT is not set
|
||||||
# CONFIG_NSH_DISABLE_GET is not set
|
# CONFIG_NSH_DISABLE_GET is not set
|
||||||
|
# CONFIG_NSH_DISABLE_HEXDUMP is not set
|
||||||
# CONFIG_NSH_DISABLE_ITEF is not set
|
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||||
# CONFIG_NSH_DISABLE_LOOPS is not set
|
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||||
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
# CONFIG_NSH_DISABLE_EXEC is not set
|
# CONFIG_NSH_DISABLE_EXEC is not set
|
||||||
# CONFIG_NSH_DISABLE_EXIT is not set
|
# CONFIG_NSH_DISABLE_EXIT is not set
|
||||||
# CONFIG_NSH_DISABLE_GET is not set
|
# CONFIG_NSH_DISABLE_GET is not set
|
||||||
|
# CONFIG_NSH_DISABLE_HEXDUMP is not set
|
||||||
# CONFIG_NSH_DISABLE_ITEF is not set
|
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||||
# CONFIG_NSH_DISABLE_LOOPS is not set
|
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||||
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
# CONFIG_NSH_DISABLE_EXEC is not set
|
# CONFIG_NSH_DISABLE_EXEC is not set
|
||||||
# CONFIG_NSH_DISABLE_EXIT is not set
|
# CONFIG_NSH_DISABLE_EXIT is not set
|
||||||
# CONFIG_NSH_DISABLE_GET is not set
|
# CONFIG_NSH_DISABLE_GET is not set
|
||||||
|
# CONFIG_NSH_DISABLE_HEXDUMP is not set
|
||||||
# CONFIG_NSH_DISABLE_ITEF is not set
|
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||||
# CONFIG_NSH_DISABLE_LOOPS is not set
|
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||||
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
||||||
|
|||||||
@@ -17,11 +17,13 @@
|
|||||||
# CONFIG_NSH_DISABLE_DF is not set
|
# CONFIG_NSH_DISABLE_DF is not set
|
||||||
# CONFIG_NSH_DISABLE_EXEC is not set
|
# CONFIG_NSH_DISABLE_EXEC is not set
|
||||||
# CONFIG_NSH_DISABLE_GET is not set
|
# CONFIG_NSH_DISABLE_GET is not set
|
||||||
|
# CONFIG_NSH_DISABLE_HEXDUMP is not set
|
||||||
# CONFIG_NSH_DISABLE_ITEF is not set
|
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||||
# CONFIG_NSH_DISABLE_LOOPS is not set
|
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||||
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
||||||
# CONFIG_NSH_DISABLE_SEMICOLON is not set
|
# CONFIG_NSH_DISABLE_SEMICOLON is not set
|
||||||
# CONFIG_NSH_DISABLE_TIME is not set
|
# CONFIG_NSH_DISABLE_TIME is not set
|
||||||
|
# CONFIG_NSH_DISABLE_XD is not set
|
||||||
CONFIG_ARCH="arm"
|
CONFIG_ARCH="arm"
|
||||||
CONFIG_ARCH_BOARD_CUSTOM=y
|
CONFIG_ARCH_BOARD_CUSTOM=y
|
||||||
CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/px4/fmu-v5x/nuttx-config"
|
CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/px4/fmu-v5x/nuttx-config"
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ static uint8_t shutdown_lock_counter = 0;
|
|||||||
|
|
||||||
int px4_shutdown_lock()
|
int px4_shutdown_lock()
|
||||||
{
|
{
|
||||||
|
printf("px4_shutdown_lock\n");
|
||||||
|
|
||||||
int ret = pthread_mutex_lock(&shutdown_mutex);
|
int ret = pthread_mutex_lock(&shutdown_mutex);
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
@@ -80,6 +82,8 @@ int px4_shutdown_lock()
|
|||||||
|
|
||||||
int px4_shutdown_unlock()
|
int px4_shutdown_unlock()
|
||||||
{
|
{
|
||||||
|
printf("px4_shutdown_unlock\n");
|
||||||
|
|
||||||
int ret = pthread_mutex_lock(&shutdown_mutex);
|
int ret = pthread_mutex_lock(&shutdown_mutex);
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
|
|||||||
Submodule platforms/nuttx/NuttX/nuttx updated: 0a5f0d0b6c...e8ee26be5a
@@ -1212,7 +1212,10 @@ int param_save_default()
|
|||||||
if (res == PX4_OK) {
|
if (res == PX4_OK) {
|
||||||
// reopen file to verify
|
// reopen file to verify
|
||||||
int fd_verify = ::open(filename, O_RDONLY, PX4_O_MODE_666);
|
int fd_verify = ::open(filename, O_RDONLY, PX4_O_MODE_666);
|
||||||
res = param_verify(fd_verify);
|
|
||||||
|
// verify twice to be paranoid
|
||||||
|
res = param_verify(fd_verify) || lseek(fd_verify, 0, SEEK_SET) || param_verify(fd_verify);
|
||||||
|
|
||||||
::close(fd_verify);
|
::close(fd_verify);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1368,7 +1371,7 @@ static int param_verify_callback(bson_decoder_t decoder, bson_node_t node)
|
|||||||
|
|
||||||
static int param_verify(int fd)
|
static int param_verify(int fd)
|
||||||
{
|
{
|
||||||
PX4_DEBUG("param_verify");
|
printf("\n\nparam_verify\n");
|
||||||
|
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user