mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 00:53:34 +08:00
refator events: move temperature calibration implementation into subdirectory
This commit is contained in:
@@ -38,9 +38,9 @@ px4_add_module(
|
|||||||
COMPILE_FLAGS
|
COMPILE_FLAGS
|
||||||
SRCS
|
SRCS
|
||||||
send_event.cpp
|
send_event.cpp
|
||||||
temperature_gyro_calibration.cpp
|
temperature_calibration/gyro.cpp
|
||||||
temperature_accel_calibration.cpp
|
temperature_calibration/accel.cpp
|
||||||
temperature_baro_calibration.cpp
|
temperature_calibration/baro.cpp
|
||||||
DEPENDS
|
DEPENDS
|
||||||
platforms__common
|
platforms__common
|
||||||
modules__uORB
|
modules__uORB
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "send_event.h"
|
#include "send_event.h"
|
||||||
#include "temperature_calibration.h"
|
#include "temperature_calibration/temperature_calibration.h"
|
||||||
|
|
||||||
#include <px4_log.h>
|
#include <px4_log.h>
|
||||||
#include <drivers/drv_hrt.h>
|
#include <drivers/drv_hrt.h>
|
||||||
@@ -129,7 +129,9 @@ void SendEvent::process_commands()
|
|||||||
} else {
|
} else {
|
||||||
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_FAILED);
|
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_FAILED);
|
||||||
}
|
}
|
||||||
} else if ((int)(cmd.param1) == 3) { //TODO: this needs to be specified in mavlink (and adjust commander accordingly)...
|
|
||||||
|
} else if ((int)(cmd.param1) ==
|
||||||
|
3) { //TODO: this needs to be specified in mavlink (and adjust commander accordingly)...
|
||||||
|
|
||||||
if (run_temperature_accel_calibration() == 0) {
|
if (run_temperature_accel_calibration() == 0) {
|
||||||
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED);
|
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED);
|
||||||
@@ -137,7 +139,9 @@ void SendEvent::process_commands()
|
|||||||
} else {
|
} else {
|
||||||
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_FAILED);
|
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_FAILED);
|
||||||
}
|
}
|
||||||
} else if ((int)(cmd.param1) == 4) { //TODO: this needs to be specified in mavlink (and adjust commander accordingly)...
|
|
||||||
|
} else if ((int)(cmd.param1) ==
|
||||||
|
4) { //TODO: this needs to be specified in mavlink (and adjust commander accordingly)...
|
||||||
|
|
||||||
if (run_temperature_baro_calibration() == 0) {
|
if (run_temperature_baro_calibration() == 0) {
|
||||||
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED);
|
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED);
|
||||||
|
|||||||
Reference in New Issue
Block a user