Skip to content

Commit

Permalink
增加了部分ins模块的启动
Browse files Browse the repository at this point in the history
  • Loading branch information
ComerLater committed Apr 30, 2024
1 parent 348a54c commit 1375894
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 2 deletions.
10 changes: 10 additions & 0 deletions apps/estimator/attitude_estimator_q/attitude_estimator_q_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,3 +569,13 @@ Attitude estimator q.
extern "C" __EXPORT int attitude_estimator_q_main(int argc, char *argv[]) {
return AttitudeEstimatorQ::main(argc, argv);
}

MSH_CMD_EXPORT_ALIAS(attitude_estimator_q_main, att_est_q, attitude estimator q);

int attitude_estimator_q_start() {
const char *argv[] = {"attitude_estimator_q", "start"};
int argc = sizeof(argv) / sizeof(argv[0]);
return attitude_estimator_q_main(argc, (char **)argv);
}

INIT_APP_EXPORT(attitude_estimator_q_start);
11 changes: 10 additions & 1 deletion apps/estimator/gyro_calibration/GyroCalibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#define LOG_TAG "gyro_cali"

#include "GyroCalibration.hpp"

#include <geo/geo.h>

using namespace time_literals;
Expand Down Expand Up @@ -307,3 +306,13 @@ Simple online gyroscope calibration.
extern "C" __EXPORT int gyro_calibration_main(int argc, char *argv[]) {
return GyroCalibration::main(argc, argv);
}

MSH_CMD_EXPORT_ALIAS(gyro_calibration_main, gyro_cali, gyro calibration);

int gyro_calibration_start() {
const char *argv[] = {"gyro_calibration", "start"};
int argc = sizeof(argv) / sizeof(argv[0]);
return gyro_calibration_main(argc, (char **)argv);
}

INIT_APP_EXPORT(gyro_calibration_start);
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*****************************************************************
* _ __ __ ____ _ __ __
* / | / /___ _ __ / /_ / __ \ (_)/ /____ / /_
* / |/ // _ \ | |/_// __// /_/ // // // __ \ / __/
* / /| // __/_> < / /_ / ____// // // /_/ // /_
* /_/ |_/ \___//_/|_| \__//_/ /_//_/ \____/ \__/
*
* Copyright All Reserved © 2015-2024 NextPilot Development Team
******************************************************************/

#define LOG_TAG "local_pos_est"

#include "BlockLocalPositionEstimator.hpp"
#include <ulog/mavlink_log.h>
#include <fcntl.h>
// #include <systemlib/err.h>
#include <matrix/math.hpp>
#include <cstdlib>

Expand Down Expand Up @@ -1029,3 +1040,13 @@ Attitude and position estimator using an Extended Kalman Filter.
extern "C" __EXPORT int local_position_estimator_main(int argc, char *argv[]) {
return BlockLocalPositionEstimator::main(argc, argv);
}

MSH_CMD_EXPORT_ALIAS(local_position_estimator_main, local_pos_est, local position estimator);

int local_position_estimator_start() {
const char *argv[] = {"local_position_estimator", "start"};
int argc = sizeof(argv) / sizeof(argv[0]);
return local_position_estimator_main(argc, (char **)argv);
}

INIT_APP_EXPORT(local_position_estimator_start);
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*****************************************************************
* _ __ __ ____ _ __ __
* / | / /___ _ __ / /_ / __ \ (_)/ /____ / /_
* / |/ // _ \ | |/_// __// /_/ // // // __ \ / __/
* / /| // __/_> < / /_ / ____// // // /_/ // /_
* /_/ |_/ \___//_/|_| \__//_/ /_//_/ \____/ \__/
*
* Copyright All Reserved © 2015-2024 NextPilot Development Team
******************************************************************/


#pragma once

#include <hrtimer.h>
Expand Down
12 changes: 12 additions & 0 deletions apps/estimator/mag_bias_estimator/MagBiasEstimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Copyright All Reserved © 2015-2024 NextPilot Development Team
******************************************************************/

#define LOG_TAG "mag_bias_est"

#include "MagBiasEstimator.hpp"

using namespace time_literals;
Expand Down Expand Up @@ -257,4 +259,14 @@ extern "C" __EXPORT int mag_bias_estimator_main(int argc, char *argv[]) {
return MagBiasEstimator::main(argc, argv);
}

MSH_CMD_EXPORT_ALIAS(mag_bias_estimator_main, mag_bias_est, mag bias estimator);

int mag_bias_estimator_start() {
const char *argv[] = {"mag_bias_estimator", "start"};
int argc = sizeof(argv) / sizeof(argv[0]);
return mag_bias_estimator_main(argc, (char **)argv);
}

INIT_APP_EXPORT(mag_bias_estimator_start);

} // namespace mag_bias_estimator

0 comments on commit 1375894

Please sign in to comment.