mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 02:43:33 +08:00
fix code style if trivial one line difference
This commit is contained in:
committed by
Lorenz Meier
parent
c147424fe7
commit
c2abb0f82a
@@ -177,6 +177,7 @@ int parameters_update(const struct attitude_estimator_ekf_param_handles *h, stru
|
||||
for (int i = 0; i < 3; i++) {
|
||||
param_get(h->moment_inertia_J[i], &(p->moment_inertia_J[3 * i + i]));
|
||||
}
|
||||
|
||||
param_get(h->use_moment_inertia, &(p->use_moment_inertia));
|
||||
|
||||
return OK;
|
||||
|
||||
@@ -57,4 +57,5 @@
|
||||
* @return 0 on success, 1 on failure
|
||||
*/
|
||||
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);
|
||||
unsigned int size, unsigned int max_iterations, float delta, float *sphere_x, float *sphere_y, float *sphere_z,
|
||||
float *sphere_radius);
|
||||
@@ -57,7 +57,7 @@ PARAM_DEFINE_FLOAT(FWB_V_CMD, 12.0f); // commanded velocity
|
||||
PARAM_DEFINE_FLOAT(FWB_V_MAX, 16.0f); // maximum commanded velocity
|
||||
|
||||
// rate of climb
|
||||
// this is what rate of climb is commanded (in m/s)
|
||||
// this is what rate of climb is commanded (in m/s)
|
||||
// when the pitch stick is fully defelcted in simple mode
|
||||
PARAM_DEFINE_FLOAT(FWB_CR_MAX, 1.0f);
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ MavlinkStream::update(const hrt_abstime t)
|
||||
if (dt > 0 && dt >= interval) {
|
||||
/* interval expired, send message */
|
||||
send(t);
|
||||
|
||||
if (const_rate()) {
|
||||
_last_sent = (t / _interval) * _interval;
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
* @return true: system is inside fence, false: system is outside fence
|
||||
*/
|
||||
bool inside(const struct vehicle_global_position_s &global_position,
|
||||
const struct vehicle_gps_position_s &gps_position,float baro_altitude_amsl);
|
||||
const struct vehicle_gps_position_s &gps_position, float baro_altitude_amsl);
|
||||
bool inside_polygon(double lat, double lon, float altitude);
|
||||
|
||||
int clearDm();
|
||||
|
||||
@@ -15,6 +15,7 @@ void inertial_filter_predict(float dt, float x[2], float acc)
|
||||
if (!isfinite(acc)) {
|
||||
acc = 0.0f;
|
||||
}
|
||||
|
||||
x[0] += x[1] * dt + acc * dt * dt / 2.0f;
|
||||
x[1] += acc * dt;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ sbus1_output(uint16_t *values, uint16_t num_values)
|
||||
value = (uint16_t)(((values[i] - SBUS_SCALE_OFFSET) / SBUS_SCALE_FACTOR) + .5f);
|
||||
|
||||
/*protect from out of bounds values and limit to 11 bits*/
|
||||
if (value > 0x07ff ) {
|
||||
if (value > 0x07ff) {
|
||||
value = 0x07ff;
|
||||
}
|
||||
|
||||
|
||||
@@ -682,7 +682,7 @@ PARAM_DEFINE_INT32(SENS_FLOW_ROT, 0);
|
||||
*
|
||||
* @group Sensor Calibration
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(SENS_BOARD_Y_OFF, 0.0f);
|
||||
PARAM_DEFINE_FLOAT(SENS_BOARD_Y_OFF, 0.0f);
|
||||
|
||||
/**
|
||||
* Board rotation X (Roll) offset
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <px4.h>
|
||||
#include <systemlib/circuit_breaker.h>
|
||||
|
||||
bool circuit_breaker_enabled(const char* breaker, int32_t magic)
|
||||
bool circuit_breaker_enabled(const char *breaker, int32_t magic)
|
||||
{
|
||||
int32_t val;
|
||||
(void)PX4_PARAM_GET_BYNAME(breaker, &val);
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
extern "C" __EXPORT bool circuit_breaker_enabled(const char* breaker, int32_t magic);
|
||||
extern "C" __EXPORT bool circuit_breaker_enabled(const char *breaker, int32_t magic);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
__BEGIN_DECLS
|
||||
__BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* Check the RC calibration
|
||||
|
||||
@@ -92,7 +92,7 @@ struct esc_status_s {
|
||||
struct {
|
||||
enum ESC_VENDOR esc_vendor; /**< Vendor of current ESC */
|
||||
uint32_t esc_errorcount; /**< Number of reported errors by ESC - if supported */
|
||||
int32_t esc_rpm; /**< Motor RPM, negative for reverse rotation [RPM] - if supported */
|
||||
int32_t esc_rpm; /**< Motor RPM, negative for reverse rotation [RPM] - if supported */
|
||||
float esc_voltage; /**< Voltage measured from current ESC [V] - if supported */
|
||||
float esc_current; /**< Current measured from current ESC [A] - if supported */
|
||||
float esc_temperature; /**< Temperature measured from current ESC [degC] - if supported */
|
||||
|
||||
@@ -65,7 +65,7 @@ struct fence_vertex_s {
|
||||
* This is the position of a geofence
|
||||
*
|
||||
*/
|
||||
struct fence_s {
|
||||
struct fence_s {
|
||||
unsigned count; /**< number of actual vertices */
|
||||
struct fence_vertex_s vertices[GEOFENCE_MAX_VERTICES];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user