mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-08 17:00:35 +08:00
Merge branch 'beta'
This commit is contained in:
@@ -878,6 +878,8 @@ int commander_thread_main(int argc, char *argv[])
|
||||
param_t _param_autostart_id = param_find("SYS_AUTOSTART");
|
||||
param_t _param_autosave_params = param_find("COM_AUTOS_PAR");
|
||||
param_t _param_rc_in_off = param_find("COM_RC_IN_MODE");
|
||||
param_t _param_eph = param_find("COM_HOME_H_T");
|
||||
param_t _param_epv = param_find("COM_HOME_V_T");
|
||||
|
||||
const char *main_states_str[vehicle_status_s::MAIN_STATE_MAX];
|
||||
main_states_str[vehicle_status_s::MAIN_STATE_MANUAL] = "MANUAL";
|
||||
@@ -1300,6 +1302,10 @@ int commander_thread_main(int argc, char *argv[])
|
||||
|
||||
/* Parameter autosave setting */
|
||||
param_get(_param_autosave_params, &autosave_params);
|
||||
|
||||
/* EPH / EPV */
|
||||
param_get(_param_eph, &eph_threshold);
|
||||
param_get(_param_epv, &epv_threshold);
|
||||
}
|
||||
|
||||
/* Set flag to autosave parameters if necessary */
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2013 PX4 Development Team. All rights reserved.
|
||||
* Author: Lorenz Meier <lm@inf.ethz.ch>
|
||||
* Copyright (c) 2013-2015 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -37,16 +36,54 @@
|
||||
*
|
||||
* Parameters defined by the sensors task.
|
||||
*
|
||||
* @author Lorenz Meier <lm@inf.ethz.ch>
|
||||
* @author Thomas Gubler <thomasgubler@student.ethz.ch>
|
||||
* @author Julian Oes <julian@oes.ch>
|
||||
* @author Lorenz Meier <lorenz@px4.io>
|
||||
* @author Thomas Gubler <thomas@px4.io>
|
||||
* @author Julian Oes <julian@px4.io>
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <systemlib/param/param.h>
|
||||
|
||||
/**
|
||||
* Roll trim
|
||||
*
|
||||
* The trim value is the actuator control value the system needs
|
||||
* for straight and level flight. It can be calibrated by
|
||||
* flying manually straight and level using the RC trims and
|
||||
* copying them using the GCS.
|
||||
*
|
||||
* @group Radio Calibration
|
||||
* @min -0.25
|
||||
* @max 0.25
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(TRIM_ROLL, 0.0f);
|
||||
|
||||
/**
|
||||
* Pitch trim
|
||||
*
|
||||
* The trim value is the actuator control value the system needs
|
||||
* for straight and level flight. It can be calibrated by
|
||||
* flying manually straight and level using the RC trims and
|
||||
* copying them using the GCS.
|
||||
*
|
||||
* @group Radio Calibration
|
||||
* @min -0.25
|
||||
* @max 0.25
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(TRIM_PITCH, 0.0f);
|
||||
|
||||
/**
|
||||
* Yaw trim
|
||||
*
|
||||
* The trim value is the actuator control value the system needs
|
||||
* for straight and level flight. It can be calibrated by
|
||||
* flying manually straight and level using the RC trims and
|
||||
* copying them using the GCS.
|
||||
*
|
||||
* @group Radio Calibration
|
||||
* @min -0.25
|
||||
* @max 0.25
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(TRIM_YAW, 0.0f);
|
||||
|
||||
/**
|
||||
@@ -77,6 +114,7 @@ PARAM_DEFINE_FLOAT(BAT_V_CHARGED, 4.2f);
|
||||
*
|
||||
* @group Battery Calibration
|
||||
* @unit V
|
||||
* @min 0.0f
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(BAT_V_LOAD_DROP, 0.07f);
|
||||
|
||||
@@ -87,6 +125,8 @@ PARAM_DEFINE_FLOAT(BAT_V_LOAD_DROP, 0.07f);
|
||||
*
|
||||
* @group Battery Calibration
|
||||
* @unit S
|
||||
* @min 1
|
||||
* @max 10
|
||||
*/
|
||||
PARAM_DEFINE_INT32(BAT_N_CELLS, 3);
|
||||
|
||||
@@ -182,7 +222,31 @@ PARAM_DEFINE_FLOAT(COM_EF_TIME, 10.0f);
|
||||
* @min 0
|
||||
* @max 35
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(COM_RC_LOSS_T, 0.5);
|
||||
PARAM_DEFINE_FLOAT(COM_RC_LOSS_T, 0.5f);
|
||||
|
||||
/**
|
||||
* Home set horizontal threshold
|
||||
*
|
||||
* The home position will be set if the estimated positioning accuracy is below the threshold.
|
||||
*
|
||||
* @group Commander
|
||||
* @unit meter
|
||||
* @min 2
|
||||
* @max 15
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(COM_HOME_H_T, 5.0f);
|
||||
|
||||
/**
|
||||
* Home set vertical threshold
|
||||
*
|
||||
* The home position will be set if the estimated positioning accuracy is below the threshold.
|
||||
*
|
||||
* @group Commander
|
||||
* @unit meter
|
||||
* @min 5
|
||||
* @max 25
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(COM_HOME_V_T, 10.0f);
|
||||
|
||||
/**
|
||||
* Autosaving of params
|
||||
|
||||
Reference in New Issue
Block a user