aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorDaniel Agar <daniel@agar.ca>2015-03-02 14:36:04 -0500
committerLorenz Meier <lm@inf.ethz.ch>2015-03-19 23:49:36 +0100
commitc2abb0f82ac23aab3295522ade4c255323191931 (patch)
treea87146edb8736e8f447e97eb6624b909aefe57c2 /src/modules
parentc147424fe735d92c5271ba3b5bc830bb33fb6097 (diff)
downloadpx4-firmware-c2abb0f82ac23aab3295522ade4c255323191931.tar.gz
px4-firmware-c2abb0f82ac23aab3295522ade4c255323191931.tar.bz2
px4-firmware-c2abb0f82ac23aab3295522ade4c255323191931.zip
fix code style if trivial one line difference
Diffstat (limited to 'src/modules')
-rwxr-xr-xsrc/modules/attitude_estimator_ekf/attitude_estimator_ekf_params.c1
-rw-r--r--src/modules/commander/calibration_routines.h3
-rw-r--r--src/modules/fixedwing_backside/params.c2
-rw-r--r--src/modules/mavlink/mavlink_stream.cpp1
-rw-r--r--src/modules/navigator/geofence.h2
-rw-r--r--src/modules/position_estimator_inav/inertial_filter.c1
-rw-r--r--src/modules/px4iofirmware/sbus.c2
-rw-r--r--src/modules/sensors/sensor_params.c2
-rw-r--r--src/modules/systemlib/circuit_breaker.cpp2
-rw-r--r--src/modules/systemlib/circuit_breaker.h2
-rw-r--r--src/modules/systemlib/rc_check.h2
-rw-r--r--src/modules/uORB/topics/esc_status.h2
-rw-r--r--src/modules/uORB/topics/fence.h2
13 files changed, 14 insertions, 10 deletions
diff --git a/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_params.c b/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_params.c
index 5637ec102..e143f37b9 100755
--- a/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_params.c
+++ b/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_params.c
@@ -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;
diff --git a/src/modules/commander/calibration_routines.h b/src/modules/commander/calibration_routines.h
index 3c8e49ee9..ba4ca07cc 100644
--- a/src/modules/commander/calibration_routines.h
+++ b/src/modules/commander/calibration_routines.h
@@ -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); \ No newline at end of file
+ unsigned int size, unsigned int max_iterations, float delta, float *sphere_x, float *sphere_y, float *sphere_z,
+ float *sphere_radius); \ No newline at end of file
diff --git a/src/modules/fixedwing_backside/params.c b/src/modules/fixedwing_backside/params.c
index db30af416..aa82a4f59 100644
--- a/src/modules/fixedwing_backside/params.c
+++ b/src/modules/fixedwing_backside/params.c
@@ -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);
diff --git a/src/modules/mavlink/mavlink_stream.cpp b/src/modules/mavlink/mavlink_stream.cpp
index 5b9e45d3e..57a92c8b5 100644
--- a/src/modules/mavlink/mavlink_stream.cpp
+++ b/src/modules/mavlink/mavlink_stream.cpp
@@ -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;
diff --git a/src/modules/navigator/geofence.h b/src/modules/navigator/geofence.h
index 9d647cb68..37a41b68a 100644
--- a/src/modules/navigator/geofence.h
+++ b/src/modules/navigator/geofence.h
@@ -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();
diff --git a/src/modules/position_estimator_inav/inertial_filter.c b/src/modules/position_estimator_inav/inertial_filter.c
index a36a4688d..c70cbeb0e 100644
--- a/src/modules/position_estimator_inav/inertial_filter.c
+++ b/src/modules/position_estimator_inav/inertial_filter.c
@@ -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;
}
diff --git a/src/modules/px4iofirmware/sbus.c b/src/modules/px4iofirmware/sbus.c
index d76ec55f0..9d2849090 100644
--- a/src/modules/px4iofirmware/sbus.c
+++ b/src/modules/px4iofirmware/sbus.c
@@ -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;
}
diff --git a/src/modules/sensors/sensor_params.c b/src/modules/sensors/sensor_params.c
index 272e4b14f..1acc14fc6 100644
--- a/src/modules/sensors/sensor_params.c
+++ b/src/modules/sensors/sensor_params.c
@@ -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
diff --git a/src/modules/systemlib/circuit_breaker.cpp b/src/modules/systemlib/circuit_breaker.cpp
index ea478a60f..f5ff0afd4 100644
--- a/src/modules/systemlib/circuit_breaker.cpp
+++ b/src/modules/systemlib/circuit_breaker.cpp
@@ -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);
diff --git a/src/modules/systemlib/circuit_breaker.h b/src/modules/systemlib/circuit_breaker.h
index c97dbc26f..c76e6c37f 100644
--- a/src/modules/systemlib/circuit_breaker.h
+++ b/src/modules/systemlib/circuit_breaker.h
@@ -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
diff --git a/src/modules/systemlib/rc_check.h b/src/modules/systemlib/rc_check.h
index e70b83cce..035f63bef 100644
--- a/src/modules/systemlib/rc_check.h
+++ b/src/modules/systemlib/rc_check.h
@@ -39,7 +39,7 @@
#pragma once
- __BEGIN_DECLS
+__BEGIN_DECLS
/**
* Check the RC calibration
diff --git a/src/modules/uORB/topics/esc_status.h b/src/modules/uORB/topics/esc_status.h
index b45c49788..73fe0f936 100644
--- a/src/modules/uORB/topics/esc_status.h
+++ b/src/modules/uORB/topics/esc_status.h
@@ -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 */
diff --git a/src/modules/uORB/topics/fence.h b/src/modules/uORB/topics/fence.h
index a61f078ba..43cee89fe 100644
--- a/src/modules/uORB/topics/fence.h
+++ b/src/modules/uORB/topics/fence.h
@@ -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];
};