mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 17:35:22 +08:00
Nuttx: fixups after rebase on Linux
Seems that mavlink_receiver_linux.cpp inherited the history from mavlink_receiver.cpp so updates went to it vs mavlink_receiver_nuttx.cpp Two module.mk files used ifdef instead of ifeq. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
* @author Lorenz Meier <lm@inf.ethz.ch>
|
||||
*/
|
||||
|
||||
#include <px4_defines.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <math.h>
|
||||
@@ -53,9 +54,6 @@
|
||||
#include "calibration_messages.h"
|
||||
#include "commander_helper.h"
|
||||
|
||||
// FIXME: Fix return codes
|
||||
//static const int ERROR = -1;
|
||||
|
||||
int sphere_fit_least_squares(const float x[], const float y[], const float z[],
|
||||
unsigned int size, unsigned int max_iterations, float delta, float *sphere_x, float *sphere_y, float *sphere_z,
|
||||
float *sphere_radius)
|
||||
@@ -414,7 +412,7 @@ int calibrate_from_orientation(int mavlink_fd,
|
||||
int sub_accel = orb_subscribe_multi(ORB_ID(sensor_accel), 0);
|
||||
if (sub_accel < 0) {
|
||||
mavlink_and_console_log_critical(mavlink_fd, "No onboard accel found, abort");
|
||||
return ERROR;
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
unsigned orientation_failures = 0;
|
||||
@@ -422,7 +420,7 @@ int calibrate_from_orientation(int mavlink_fd,
|
||||
// Rotate through all three main positions
|
||||
while (true) {
|
||||
if (orientation_failures > 10) {
|
||||
result = ERROR;
|
||||
result = PX4_ERROR;
|
||||
mavlink_and_console_log_info(mavlink_fd, CAL_FAILED_ORIENTATION_TIMEOUT);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user