mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 23:33:34 +08:00
Merge branch 'beta' into stable
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# att & pos estimator, att & pos control.
|
||||
#
|
||||
|
||||
attitude_estimator_ekf start
|
||||
attitude_estimator_q start
|
||||
#ekf_att_pos_estimator start
|
||||
position_estimator_inav start
|
||||
|
||||
|
||||
@@ -697,7 +697,7 @@ then
|
||||
fi
|
||||
unset EXIT_ON_END
|
||||
|
||||
# Run no SD alarm last
|
||||
# Run no SD alarm
|
||||
if [ $LOG_FILE == /dev/null ]
|
||||
then
|
||||
echo "[i] No microSD card found"
|
||||
@@ -705,6 +705,9 @@ then
|
||||
tone_alarm error
|
||||
fi
|
||||
|
||||
# Boot is complete, inform MAVLink app(s) that the system is now fully up and running
|
||||
mavlink boot_complete
|
||||
|
||||
# End of autostart
|
||||
fi
|
||||
|
||||
|
||||
@@ -115,6 +115,8 @@ extern mavlink_system_t mavlink_system;
|
||||
|
||||
static void usage(void);
|
||||
|
||||
bool Mavlink::_boot_complete = false;
|
||||
|
||||
Mavlink::Mavlink() :
|
||||
_device_name(DEFAULT_DEVICE_NAME),
|
||||
_task_should_exit(false),
|
||||
@@ -1909,6 +1911,10 @@ int mavlink_main(int argc, char *argv[])
|
||||
} else if (!strcmp(argv[1], "stream")) {
|
||||
return Mavlink::stream_command(argc, argv);
|
||||
|
||||
} else if (!strcmp(argv[1], "boot_complete")) {
|
||||
Mavlink::set_boot_complete();
|
||||
return 0;
|
||||
|
||||
} else {
|
||||
usage();
|
||||
exit(1);
|
||||
|
||||
@@ -145,6 +145,14 @@ public:
|
||||
|
||||
bool get_forwarding_on() { return _forwarding_on; }
|
||||
|
||||
/**
|
||||
* Set the boot complete flag on all instances
|
||||
*
|
||||
* Setting the flag unblocks parameter transmissions, which are gated
|
||||
* beforehand to ensure that the system is fully initialized.
|
||||
*/
|
||||
static void set_boot_complete() { _boot_complete = true; }
|
||||
|
||||
/**
|
||||
* Get the free space in the transmit buffer
|
||||
*
|
||||
@@ -294,6 +302,8 @@ public:
|
||||
|
||||
unsigned get_system_type() { return _system_type; }
|
||||
|
||||
static bool boot_complete() { return _boot_complete; }
|
||||
|
||||
protected:
|
||||
Mavlink *next;
|
||||
|
||||
@@ -302,6 +312,7 @@ private:
|
||||
|
||||
int _mavlink_fd;
|
||||
bool _task_running;
|
||||
static bool _boot_complete;
|
||||
|
||||
/* states */
|
||||
bool _hil_enabled; /**< Hardware In the Loop mode */
|
||||
|
||||
@@ -193,7 +193,7 @@ void
|
||||
MavlinkParametersManager::send(const hrt_abstime t)
|
||||
{
|
||||
/* send all parameters if requested, but only after the system has booted */
|
||||
if (_send_all_index >= 0 && t > 4 * 1000 * 1000) {
|
||||
if (_send_all_index >= 0 && _mavlink->boot_complete()) {
|
||||
|
||||
/* skip if no space is available */
|
||||
if (_mavlink->get_free_tx_buf() < get_size()) {
|
||||
|
||||
@@ -680,7 +680,7 @@ PARAM_DEFINE_INT32(SENS_FLOW_ROT, 0);
|
||||
* This parameter defines a rotational offset in degrees around the Y (Pitch) axis. It allows the user
|
||||
* to fine tune the board offset in the event of misalignment.
|
||||
*
|
||||
* @unit radians
|
||||
* @unit degrees
|
||||
* @group Sensor Calibration
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(SENS_BOARD_Y_OFF, 0.0f);
|
||||
@@ -691,7 +691,7 @@ PARAM_DEFINE_FLOAT(SENS_BOARD_Y_OFF, 0.0f);
|
||||
* This parameter defines a rotational offset in degrees around the X (Roll) axis It allows the user
|
||||
* to fine tune the board offset in the event of misalignment.
|
||||
*
|
||||
* @unit radians
|
||||
* @unit degrees
|
||||
* @group Sensor Calibration
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(SENS_BOARD_X_OFF, 0.0f);
|
||||
@@ -702,7 +702,7 @@ PARAM_DEFINE_FLOAT(SENS_BOARD_X_OFF, 0.0f);
|
||||
* This parameter defines a rotational offset in degrees around the Z (Yaw) axis. It allows the user
|
||||
* to fine tune the board offset in the event of misalignment.
|
||||
*
|
||||
* @unit radians
|
||||
* @unit degrees
|
||||
* @group Sensor Calibration
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(SENS_BOARD_Z_OFF, 0.0f);
|
||||
|
||||
Reference in New Issue
Block a user